﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="SampleSite.Main" %>

<!-- Put IE into quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title></title>
	<meta name="DESCRIPTION" content="DBank数据银行 - 安全、快捷、稳定、易用、免费、专业的网络硬盘" />
	<meta name="KEYWORDS" content="网盘, 网络硬盘，网络u盘,免费网盘,免费网络硬盘,免费网络u盘,免费网盘申请,免费网络硬盘申请,免费网络u盘申请,dbank.com" />
	<link href="css/default/layout.css-version=v1.20.5.1.css" type="text/css" rel="stylesheet" />
	<link href="css/jDbank.css-version=v1.20.5.1.css" type="text/css" rel="stylesheet" />
	<link id="cssLinkId" href="css/default/style.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/jquery-ui-1.7.1.draggable.min.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/jDbank.js?version=v1.21"></script>
	<!-- 公共变量设置 -->
	<script type="text/javascript" src="/commons/globalInfo.jsp?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/emailAutoComplete-min.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/folder.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/linkman.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/share_folder.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/file.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/photoview.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/deliver.js?version=v1.21"></script>
	<!-- SWFUpload  START-->
	<script type="text/javascript" src="http://st3.dbank.com/js/swf/swfupload.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/swf_plugin/taskManger.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/swf_plugin/swfupload.dbank.plugin.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/swf_plugin/swfupload.speed.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/message.js?version=v1.21"></script>
	<!-- SWFUpload END-->
	<script type="text/javascript" src="http://st3.dbank.com/js/formValidator_min.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/formValidatorRegex.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/userValidate.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/inviter.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/points.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/store.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/user.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/advertisement.js?version=v1.21"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/report.js?version=v1.21"></script>
	<script type="text/javascript">
		//window error filter
		function filterWindowError() {
			window.onerror = function(sMsg, sUrl, sLine) {
				return false;
			};
		}

		filterWindowError();
	</script>
	<script type="text/javascript">
		/** 上传插件全局变量*/
		jDbank.data.setGlobal('ieplugin-flag', '0');
		//仅限action请求地址
		jDbank.data.setGlobal('systemContextPath()', '');
		jDbank.data.setGlobal('systemRootPath', '');
		//js文件中图片地址
		jDbank.data.setGlobal('imageRootPath', 'http://st2.dbank.com');
		jDbank.data.setGlobal('cssRootPath', 'http://st1.dbank.com');
		jDbank.data.setGlobal('jsRootPath', 'http://st3.dbank.com');
		jDbank.data.setGlobal('otherRootPath', 'http://st4.dbank.com');
		//网盘主界面地址
		jDbank.data.setGlobal('userDisk', 'goto.jsp');

		/**
		* 返回值：
		1、联系人
		2、文件快递
		3、网盘
		*/
		var getUserFileSystemType = function() {
			//分为网盘功能按钮和注册用户中转站按钮
			var type = jDbank.data.getGlobal("userFileSystemTyped");
			if (type == null) {
				return 3;
			}
			return type;
		};

		var refrestTable = function() {
			var fileSystemType = getUserFileSystemType();
			if (fileSystemType && fileSystemType == 1) {
				if (jDbank.data.getGlobal('anonyTransTable')) {
					jDbank.data.getGlobal('anonyTransTable').refresh();
				}
			} else if (fileSystemType && fileSystemType == 2) {
				if (jDbank.data.getGlobal('transTable')) {
					jDbank.data.getGlobal('transTable').refresh();
				}
			} else if (fileSystemType && fileSystemType == 3) {
				if (jDbank.data.getGlobal('mytable')) {
					jDbank.data.getGlobal('mytable').refresh();
				}
			}
		}
		//更新网盘状态栏
		var updateNetDiskStatus = function() {
			if ($("#catalog_statusdata").length > 0) {
				var status_data = $("#catalog_statusdata").text();
				if (status_data != "") {
					var dataary = status_data.split("|");
					var catasize = getFileSize(parseInt(dataary[0]));
					if (catasize.indexOf("B") == -1)
						catasize = catasize + 'B';
					$("#netdisk_status .status-size").text("当前文件夹大小：" + catasize);
					$("#netdisk_status .status-num").text("共有文件夹" + dataary[1] + "个，文件" + dataary[2] + "个");
					var dbtree = jDbank.data.getGlobal("tree");
					var oTemp = jDbank(document.getElementById(dbtree.idPre + dbtree.getFolderId()));
					var root = jDbank.data.getGlobal('sharetree');
					if (root != null && getUpLoadFileCatalogId() == root.getRootId()) {
						return;
					}
					else if (oTemp) {
						if (oTemp[0].tagName && oTemp[0].tagName.toLowerCase() == 'div' && oTemp.hasClass('item')) {
							oTemp = jDbank(oTemp[0].getElementsByTagName('span')[2]);
							if (!oTemp.hasClass('txt')) {
								return;
							}
						}
						var oPrev = oTemp.prev(), oPrev2 = oPrev.prev();
						if (dataary[1] == '0') {
							oPrev2.removeClass('opened');
						} else {
							if (!oPrev2.hasClass('opened') && !oPrev2.hasClass('closed')) {
								oPrev2.addClass('opened');
							}
						}
					}
				}
			}
		}

		var ajaxRefreshFileList = function(foldertype, sharenode) {
			/*
			var  childs = jQuery(".bodybg").children("div.contents,div.mailbox");
			for(var i=0;i<childs.length;i++){
			if(childs[i].id!='dbksendmsgcontainer'){
			childs[i].style.display="none";
			}
			}
			document.getElementById("dbkdiskcontainer").style.display="block"; 
			*/
			jDbank.data.setGlobal('addCatalogBegin', false);
			var orderName = jDbank.data.getGlobal('orderName');
			var orderType = jDbank.data.getGlobal('orderType');
			var totalPage = jDbank.data.getGlobal('totalPage');
			var currentPage = jDbank.data.getGlobal('currentPage');
			var counts = jDbank.data.getGlobal('counts');

			if (orderName == null) {
				orderName = "date";
			}
			if (orderType == null) {
				orderType = "desc";
			}

			if (totalPage == null) {
				totalPage = 1;
			}
			if (currentPage == null) {
				currentPage = 1;
			}
			if (counts == null) {
				counts = 1;
			}


			var dDiskList = document.getElementById('dbkfolderandfiles'),
		dTh = miniYUI.getElementsByClassName('filetitle', 'th', dDiskList)[0];

			var loadingHtml = '&nbsp;';
			if (jDbank.data.getGlobal('filelistdisplay') == '1') {
				$("#dbkdisklistimg").html(loadingHtml);
			} else {
				$("#dbkdisklisti").html(loadingHtml);
			}
			if (getUserFileSystemType() == 3) {
				if (jDbank.data.getGlobal('filelistdisplay') == '1') {
					document.getElementById("dbkfolderandfiles").style.display = "none";
					document.getElementById("dbklistimgs").style.display = "block";
				} else {
					document.getElementById("dbklistimgs").style.display = "none";
					document.getElementById("dbkfolderandfiles").style.display = "block";
					document.getElementById("dbkdisklist").style.display = "none";
				}
			}
			var url = jDbank.data.getGlobal("systemContextPath()") + '/ajax/refreshFileList.action';
			if (navigator.appVersion && /MSIE/ig.test(navigator.appVersion)) { url += '?fileNameLen=' + jDbank.util.getAvaiFileLen(jDbank(dTh).width()); }
			var params = jQuery.param(
	{
		'page.orderName': orderName,
		'page.orderType': orderType,
		'page.totalPage': totalPage,
		'page.currentPage': currentPage,
		'page.counts': counts,
		'resource.id': getUpLoadFileCatalogId(),
		'resource.pid': getUpLoadFileCatalogId(),
		'resource.sUid': jDbank.data.getGlobal("tree").data[getUpLoadFileCatalogId()].sUid,
		'fileSystemType': getUserFileSystemType(),
		'resource.filelistdisplay': jDbank.data.getGlobal('filelistdisplay'),
		'anticache': Math.floor(Math.random() * 1000),
		'sharenodeid': sharenode ? getShareRealId(sharenode.id) : ''
	});
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'html',
				timeout: 80000,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					if (jDbank.data.getGlobal('dbtree')._alterType == 0) {
						jDbank.ui.release();
					}
					jDbank.ui.showMsg('网盘文件加载失败，请稍候重试');
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (jDbank.data.getGlobal('dbtree')._alterType == 0) {
						//jDbank.ui.release();
					}
					if (data.indexOf("returnUrl") != -1) {
						if (outSessionValue(eval("(" + data + ")"))) {
							return;
						}
					}

					//window.bShowLoadingBar = false; //hide loading bar  add by Tan @2009.12.21
					var fileSystemType = getUserFileSystemType();
					if (fileSystemType == 2) {
						jQuery("#dbktranscontainer").html(data);
						if (document.getElementById('dbktranstable')) {
							var transTable = jDbank.data.getGlobal('transTable');
							if (!transTable) {
								transTable = new jDbank.ui.table('dbktranstable');
								transTable.setFocusIndex(5);
								transTable.init(transTable);
								transTable.bind("beforeRenameItem", myBeforeRenameItem);
								transTable.bind("afterRenameItem", myAfterRenameItem);
								transTable.bind("beforeDelItem", myBeforeDelItem);
								transTable.bind("beforeCancelRename", myCancel);
								jDbank.data.setGlobal('transTable', transTable);
							} else {
								transTable.refresh();
								transTable.rebind();
							}
						}
					} else if (fileSystemType == 3) {    //refresh file list
						if (jDbank.data.getGlobal('filelistdisplay') == '1') {
							jQuery("#dbkdisklistimg").html(data);
							document.getElementById("dbkfolderandfiles").style.display = "none";
							document.getElementById("dbklistimgs").style.display = "block";
						} else {
							jQuery("#dbkdisklist").html(data);
							document.getElementById("dbklistimgs").style.display = "none";
							document.getElementById("dbkdisklist").style.display = "block";
						}
						//更正快速新建目录问题
						jDbank.data.setGlobal('addCatalogBegin', true);
						refreshNetDiskNavigationbars(); //set current path
						window.photoisopened = false;
						var fileListFlag;
						if (jDbank.data.getGlobal('filelistdisplay') == '1') {
							fileListFlag = diskFileListImg;
						} else {
							fileListFlag = diskFileList;
						}

						if (fileListFlag) {
							fileListFlag.refresh();
							fileListFlag.widthAdapt(fileListFlag._tableObj, false);
						}

						if (!jDbank.data.getGlobal('tableDragInited') && typeof (jDbank.data.getGlobal('dbtree')) != 'undefined' //file drag init
           			&& jDbank.data.getGlobal('tree') == jDbank.data.getGlobal('dbtree')
                    ) {
							fileListFlag.dragFileInit(document.getElementById('dbkfolderandfiles'), jDbank.data.getGlobal('dbtree'), fileListFlag);
							//jDbank.data.setGlobal('tableDragInited', true);
						}
					}
					//更新状态栏
					updateNetDiskStatus();

					//var errorInfo = $("#netdisk_errorInfo").text();
					//if(errorInfo == "noshare"){
					//    jDbank.ui.showMsg('共享目录已经取消共享或者退出共享',true);
					//}
					//点击共享目录更新按钮状态
					if (foldertype) {
						if (foldertype == '0') {
							jQuery('#newbutton').removeClass("addfilebutton");
							jQuery('#newbutton').addClass("addfilegraybutton");
							jQuery('#uploadbutton').removeClass("uploadbutton");
							jQuery('#uploadbutton').addClass("uploadgraybutton");
							jQuery('#sendbutton').removeClass("sendbutton");
							jQuery('#sendbutton').addClass("sendgraybutton");
							jQuery('#deletebutton').removeClass("delbutton");
							jQuery('#deletebutton').addClass("delgraybutton");
							jQuery('#movebutton').removeClass("movebutton");
							jQuery('#movebutton').addClass("movegraybutton");
							jQuery('#copybutton').removeClass("copygraybutton");
							jQuery('#copybutton').addClass("copybutton");

							jQuery('#newbutton').attr("disabled", "disabled");
							jQuery('#uploadbutton').attr("disabled", "disabled");
							jQuery('#sendbutton').attr("disabled", "disabled");
							jQuery('#deletebutton').attr("disabled", "disabled");
							jQuery('#movebutton').attr("disabled", "disabled");

						} else if (foldertype == '1') {
							jQuery('#newbutton').removeClass("addfilegraybutton");
							jQuery('#newbutton').addClass("addfilebutton");
							jQuery('#uploadbutton').removeClass("uploadgraybutton");
							jQuery('#uploadbutton').addClass("uploadbutton");
							jQuery('#sendbutton').removeClass("sendbutton");
							jQuery('#sendbutton').addClass("sendgraybutton");
							jQuery('#deletebutton').removeClass("delbutton");
							jQuery('#deletebutton').addClass("delgraybutton");
							jQuery('#movebutton').removeClass("movebutton");
							jQuery('#movebutton').addClass("movegraybutton");
							jQuery('#copybutton').removeClass("copygraybutton");
							jQuery('#copybutton').addClass("copybutton");

							jQuery('#uploadbutton').removeAttr("disabled");
							jQuery('#newbutton').removeAttr("disabled");
							jQuery('#copybutton').removeAttr("disabled");

							jQuery('#sendbutton').attr("disabled", "disabled");
							jQuery('#deletebutton').attr("disabled", "disabled");
							jQuery('#movebutton').attr("disabled", "disabled");
						}


						//更新选中文件的可用连接状态
						jQuery('a.sendit').hide();
						jQuery('a.renameit').hide();
						jQuery('a.delit').hide();
						jQuery('a.moveit').hide();

					} else {
						//假如超容，则禁用掉一些按钮(上传，复制)
						if (isUserDiskOverflow) {
							$("#uploadbutton").attr("class", "uploadgraybutton");
							$("#uploadbutton").attr("onclick", "javascript:void(0)");
							$("#copybutton").attr("class", "copygraybutton");
							$("#copybutton").attr("onclick", "javascript:void(0)");
						} else {
							jQuery('#uploadbutton').removeClass("uploadgraybutton");
							jQuery('#uploadbutton').addClass("uploadbutton");
							jQuery('#copybutton').removeClass("copygraybutton");
							jQuery('#copybutton').addClass("copybutton");
						}
						jQuery('#newbutton').removeClass("addfilegraybutton");
						jQuery('#newbutton').addClass("addfilebutton");
						jQuery('#sendbutton').removeClass("sendgraybutton");
						jQuery('#sendbutton').addClass("sendbutton");
						jQuery('#deletebutton').removeClass("delgraybutton");
						jQuery('#deletebutton').addClass("delbutton");
						jQuery('#movebutton').removeClass("movegraybutton");
						jQuery('#movebutton').addClass("movebutton");
						jQuery('#linkbutton').show();
						jQuery('a.getlink').show();
						jQuery('#linkbutton').removeClass("linkgraybutton");
						jQuery('#linkbutton').addClass("linkbutton");
						jQuery('#newbutton').attr("disabled", "");
						jQuery('#uploadbutton').attr("disabled", "");
						jQuery('#sendbutton').attr("disabled", "");
						jQuery('#deletebutton').attr("disabled", "");
						jQuery('#movebutton').attr("disabled", "");
						jQuery('#linkbutton').attr("disabled", "");
						jQuery('#copybutton').attr("disabled", "");
					}
					if (sharenode) {
						// add by zhangjianlin
						jQuery('a.getlink').hide();
						jQuery('#linkbutton').hide();
					}


					//选择“共享文件夹”时所有按钮置灰
					var root = jDbank.data.getGlobal('sharetree');
					if (root != null && getUpLoadFileCatalogId() == root.getRootId()) {
						jQuery('#newbutton').removeClass("addfilebutton");
						jQuery('#newbutton').addClass("addfilegraybutton");
						jQuery('#uploadbutton').removeClass("uploadbutton");
						jQuery('#uploadbutton').addClass("uploadgraybutton");
						jQuery('#sendbutton').removeClass("sendbutton");
						jQuery('#sendbutton').addClass("sendgraybutton");
						jQuery('#deletebutton').removeClass("delbutton");
						jQuery('#deletebutton').addClass("delgraybutton");
						jQuery('#movebutton').removeClass("movebutton");
						jQuery('#movebutton').addClass("movegraybutton");
						jQuery('#linkbutton').removeClass("linkbutton");
						jQuery('#linkbutton').addClass("linkgraybutton");
						jQuery('#copybutton').removeClass("copybutton");
						jQuery('#copybutton').addClass("copygraybutton");

						jQuery('#newbutton').attr("disabled", "disabled");
						jQuery('#uploadbutton').attr("disabled", "disabled");
						jQuery('#sendbutton').attr("disabled", "disabled");
						jQuery('#deletebutton').attr("disabled", "disabled");
						jQuery('#movebutton').attr("disabled", "disabled");
						jQuery('#linkbutton').attr("disabled", "disabled");
						jQuery('#copybutton').attr("disabled", "disabled");
						//jQuery('#linkbutton').hide();
					}
					jDbank.module.initFlashUploader();
					window.bShowLoadingBar = false; //hide loading bar  add by Tan @2009.12.21
					var arrIds;
					if (jDbank.data.getGlobal('filelistdisplay') == '0') {
						jDbank.module.diskTableSortAtrer();
					}
				}
			});
		};

		var JSRound = function(fNum, fBit) {
			var ret = "";
			var fNumStr = fNum + "";
			var numarry = fNumStr.split(".");
			if (numarry[1] == undefined) {
				ret = fNumStr;
			} else {
				if (numarry[1].length > fBit)
					ret = numarry[0] + "." + numarry[1].substring(0, fBit);
				else
					ret = fNumStr;
			}
			return ret * 1;
		};

		var getFileSize = function(fileBytes) {
			var filesizeDesc = "";
			var sizeKB = fileBytes / 1024;
			if (sizeKB > 1) {
				var sizeMB = sizeKB / 1024;
				if (sizeMB < 1) {
					filesizeDesc = JSRound(sizeKB, 2) + "K";
				}
				else {
					var sizeGG = sizeMB / 1024;
					if (sizeGG < 1) {
						filesizeDesc = JSRound(sizeMB, 2) + "M";
					}
					else {
						//var sizeGM = sizeMB - JSRound(sizeGG,0) * 1024;
						//if(JSRound(sizeGM,2) == 0)
						filesizeDesc = JSRound(sizeGG, 0) + "G";
						//else
						//filesizeDesc = JSRound(sizeGG,0) + "G" + " " + JSRound(sizeGM,2) + "M"; 
					}
				}
			}
			else {
				filesizeDesc = fileBytes + "B";
			}
			return filesizeDesc;
		}

		var refreshUserSpace = function(userLeaveSpace, usersysspace) {
			var temp = (parseInt(usersysspace) - parseInt(userLeaveSpace)) / (parseInt(usersysspace));
			temp = JSRound(temp * 100, 0);
			if (temp == 0 && userLeaveSpace != usersysspace) {
				temp = 1;
			}
			if (temp == 100 && userLeaveSpace > 0) {
				temp = 99;
			}
			//add 2010-01-26 by caoym 取消用户剩余空间为负数的时候设置为0
			if (userLeaveSpace < 0) { userLeaveSpace = 0; }
			//文件递送容量显示
			var dLeftSize = document.getElementById("sendcontent_size");
			dLeftSize.innerHTML = SWFUpload.speed.formatBytes(userLeaveSpace);
			dLeftSize.setAttribute('leftsize', userLeaveSpace);
			jDbank.data.setGlobal("G_SendContent_Size", userLeaveSpace);
			if (temp < 100)
				jQuery("#sparesize").html(getFileSize(usersysspace));
			else
				jQuery("#sparesize").html("超容");
			$("#dbkdiskspacepercent").removeClass("oversize");
			$("#dbkdiskspacepercent").removeClass("subsize");
			if (temp >= 100) {
				temp = 100;
				$("#dbkdiskspacepercent").addClass("oversize");
				$("#dbkdiskspacepercent").attr("title", "总容量" + getFileSize(usersysspace) + "，已使用" + getFileSize(usersysspace - userLeaveSpace) + "，请删除文件，或在设置-商城中升级、扩容");

				//设置是否超容标识为true
				isUserDiskOverflow = true;
			}
			if (temp >= 80 && temp < 100) {
				$("#dbkdiskspacepercent").addClass("subsize");
				$("#dbkdiskspacepercent").attr("title", "已使用" + getFileSize(usersysspace - userLeaveSpace) + "，" + temp + '%' + "，请尽快去设置-商城里升级、扩容或删除网盘文件");
			}
			if (temp < 80)
				document.getElementById('dbkdiskspacepercent').setAttribute('title', '已使用' + getFileSize(usersysspace - userLeaveSpace) + ', ' + temp + '%');
			jQuery("#userSpacePercentCss")[0].style.width = (temp) + "%";
		};


		var getUserLeaveSpace = function() {
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/getUserSpace.action?anticache=" + Math.floor(Math.random() * 1000);
			params = "dirFlag=" + getUserFileSystemType();
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'text',
				timeout: 3000,
				async: false,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (data.indexOf("returnUrl") != -1) {
						if (outSessionValue(eval('(' + data + ')'))) {
							return;
						}
					}
					var json = eval("(" + data + ")");
					if (json['success']) {
						refreshUserSpace(json['spare'], json['sysspace']);
					}
				}
			});
		};
		var disk, send;

		/**
		* 填写转发页面默认填写的内容
		*/
		function changeTitle() {
			document.getElementById("send_title").innerText = "hjgh";
			//SWFUpload.speed.formatBytes(userLeaveSpace);		 
		}
 
 
	</script>
</head>
<body class="bodybg">
	<!-- 注册用户登录后的头部 -->
	<div class="headbg">
		<div class="headbgleft">
		</div>
		<div id="dbkhead" class="head">
			<span class="logo" onclick="leaveDeliverByUrl(12);"></span>
			<div class="headside">
				<h1>
					你好，<strong id="dbknickname"></strong></h1>
				<span id="clientDownloadsoftLink" style="display: none" class="uploadclienticon"><em></em><a href="http://st4.dbank.com/client/MiniDbankSetUp.exe" target="_blank">下载客户端</a></span>
				<p>
					<span>用户等级：<a id="curUserProduct" href="javascript:;" onclick="javascript:leaveDeliverByUrl(9);"></a></span>
					<span>积分：<a id="curUserPoints" href="javascript:;" onclick="javascript:leaveDeliverByUrl(10);"></a></span>
				</p>
			</div>
			<div class="headtip">
				<ul>
					<li>
						<a href="javascript: void(0);" onclick="javascript:leaveDeliverByUrl(6);">设置</a>|</li>
					<li>
						<a href="/ssoserver.jsp?ru=http://bbs.dbank.com/s.php?ru=/" target="_blank">论坛</a>|</li>
					<li>
						<a href="javascript: void(0);" onclick="javascript:leaveDeliverByUrl(11);">邀请</a>|</li>
					<li>
						<a href="/help.jsp" target="_blank">帮助</a>|</li>
					<li>
						<a href="/user/logout.action" onclick="javascript:return leaveDeliverByUrl(7);">退出</a></li>
				</ul>
				<div id="upload_main_progress_bar" class="sending" style="display: none" onclick="showUploadWindow(this);">
					<em style="width: 0px;"></em><cite>0%</cite>
					<span>0KB/s</span>
				</div>
				<div id="upload_complete" style="display: none" onclick="javascript:showUploadWindow();" class="sendsucces">
					<em class="successicons"></em>上传完成
				</div>
			</div>
		</div>
		<div id="loadbar" class="loadbar">
			<!--<span>常态</span>-->
			<!--<span class="starting">网盘启动中...</span>-->
			<span>文件上传中...</span>
		</div>
		<script type="text/javascript" src="http://st3.dbank.com/js/loadingBar.js"></script>
	</div>
	<div id="upload_main_info" class="sendisplay" style="display: none">
		<h2>
			<em>0</em>%
		</h2>
		<div class="textjustify">
			<p>
				任&nbsp;&nbsp;务&nbsp;&nbsp;数：<span id="d_fileinfo">0/0</span>
			</p>
			<p>
				速&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;度：<span id="d_speed">0kb</span>/秒
			</p>
			<p>
				剩余时间：<span id="d_time"></span>
			</p>
		</div>
	</div>
	<!-- 批量下载的客户端插件 -->
	<!-- 批量下载的客户端插件 -->
	<div id="clientDownloaderPlugInDiv" style="position: absolute; top: -9999px;">
		<div id="clientDownloaderPlugInContainer" classid="29188EBF-EF06-4BD4-9FFD-D1D7E12A8E97" codebase="http://st2.dbank.com/plugin/DbankDownLoadBHO.CAB#Version=#Version=1,0,0,2">
		</div>
	</div>
	<iframe name="download_client_iframe" id="download_client_iframe" style="display: none;"></iframe>
	<form id="download_client_form" method="post" target="download_client_iframe" style="display: none;">
	</form>
	<!-- 提示消息 -->
	<!-- 提示消息 -->
	<div class="clewinfo">
		<span id="dbkmsgtip" style="display: none"></span>
	</div>
	<script type="text/javascript">
		var validateMsg = '';

		if (validateMsg != '') {
			jDbank.ui.showMsg(validateMsg, true);
		}

		var infoMsg = '';
		if (infoMsg != '') {
			jDbank.ui.showMsg(infoMsg);
		}
 
	</script>
	<script type="text/javascript">
		(function() {
			var dComWin = document.getElementById('upload_complete'),
		pos,
		dShow = document.getElementById('upload_main_info');
			if (!dShow) { return; }
			jDbank("#upload_complete").mouseenter(function() {
				pos = jDbank(dComWin).offset();
				dShow.style.display = 'block';
				//dShow.style.left = pos.left + jDbank(dComWin).width() - jDbank(dShow).width() + 'px';
			}).mouseleave(function() {
				dShow.style.display = 'none';
			});

			var dProBar = document.getElementById('upload_main_progress_bar'),
		posPro;
			if (!dProBar) { return; }
			jDbank(dProBar).mouseenter(function() {
				posPro = jDbank(dProBar).offset();
				dShow.style.display = 'block';
				//dShow.style.left = posPro.left + jDbank(dProBar).width() - jDbank(dShow).width() + 2 + 'px'
			}).mouseleave(function() {
				dShow.style.display = 'none';
			});
		})();
	</script>
	<html>
	<body>
		<div class="leftbg" id="dbkleftbg">
			<div class="left" id="dbkleft">
				<div class="leftnav">
					<div id="dbkmydisk" class="none">
						<div class="leftsidebg">
							<h1 class="leftsidetitlebg">
								网络硬盘</h1>
						</div>
						<div class="leftside">
							<div id="dbkmydiskcontent" class="leftsidemain">
								<div id="mydbtree" class="dbtree">
									<center>
										<br />
										<br />
										<img src="http://st2.dbank.com/images/loading.gif" alt='loading' name='loading' /></center>
								</div>
								<div id="mydbtree3" class="dbtree sharefolder">
								</div>
							</div>
						</div>
					</div>
					<div id="dbkmytrans" class="none">
						<h1 class="leftsidetitlebg" onclick="javascript:ajaxGetGroupMenuInFileDeliver();">
							文件快递</h1>
						<div class="leftside">
							<div class="leftsidemains">
								<ul id="fileDeliverTypeId">
									<li>
										<span class="sendicon"></span>
										<a id="to_sendfilebox" href="javascript:void(0);" onclick="fileDeliverMenuControl(4);" class="sendfilebox">发送文件</a></li>
									<li>
										<span class="inboxicon"></span>
										<a id="to_recivebox" href="javascript:void(0);" onclick="fileDeliverMenuControl(5);" class="recivebox check">收件箱<em id="unreadMessageNum"></em></a></li>
									<li>
										<span class="drafticon"></span>
										<a id="to_sendbox" href="javascript:void(0);" onclick="fileDeliverMenuControl(1);" class="sendbox">已发送</a></li>
									<!--li><span></span><a href="page_news.html">草稿箱</a></li-->
								</ul>
							</div>
						</div>
					</div>
					<div id="dbklinkinfo" class="none" serviceurl="/ajax/getExternalLinkCapacity.action" sdata="{alarmNum:0.5}">
						<div class="leftsidebg">
							<h1 class="leftsidetitlebg">
								文件外链</h1>
						</div>
						<div class="leftside">
							<div class="leftsidemain">
								<div class="linkprofile">
									<p class="totalbyte">
										外链总流量：...</p>
									<p class="used clearfix">
										<span><a href="javascript:void(0);" onclick="javascript:changeFileDeliverIsShow('dbksettingcontainer');setTab('two',4,4);Store.showStore();setTimeout(function(){jDbank('#dbksettingcontainer>div.contentsm')[0].scrollTop=1000;},1000);">扩容 &gt;&gt;</a></span>已使用流量：<em class="usedbyte">...</em></p>
									<p class="linkhelp">
										<a href="/help.jsp#g1" target="_blank">流量用完了会怎样？</a></p>
								</div>
								<h3>
									我的热门文件</h3>
								<ul>
									<li>
										...</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="dbkmylinks" class="none">
						<h1 class="leftsidetitlebg">
							联系人</h1>
						<div class="leftside">
							<div class="contact">
								<form onsubmit="return searchLinkMan();">
								<input type="text" class="contactext" value="查找联系人" onclick="this.value=''" id="searchLinkManKeyWord" /><input type="button" class="contactbutton" onclick="return searchLinkMan();" />
								</form>
							</div>
							<div class="contactlist">
								<div class="contacthead">
									<span><em class="contactstar"></em>联系人</span><a href="javascript:void(0);" onclick="javascript:myLinkList.get('dUl').scrollTop = 0;myLinkList.readyAddNode(myLinkList.get('dUl').getElementsByTagName('li')[0]);">+添加分组</a>
								</div>
								<ul id="dbklinklist">
									<!-- 采用ajax设置 -->
								</ul>
								<div class="tools">
									<span><em class="toolsicon"></em>工具箱</span>
									<ul class="toolslist" id="toolslistId">
										<li>
											<em class="square"></em><a id="importFromEmailId" href="javascript:checkLinkManBox('importLinkManFromOherMail');" onfocus="this.blur()">导入邮箱联系人</a></li>
										<li>
											<em class="square"></em><a id="importFromFileId" href="javascript:checkLinkManBox('importLinkManFromFiles');" onfocus="this.blur()">导入联系人</a></li>
										<li>
											<em class="square"></em><a id="exportToFileId" href="javascript:checkLinkManBox('exportLinkMan');" onfocus="this.blur()">导出联系人</a></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</div>
				<ul id="dbkswitcher" class="leftsidebottom">
					<li class="hrline">
					</li>
					<li id="netDiskOnclickID">
						<a href="javascript:void(0);" class="activetitle">
							<span class="leftsidemyicon"></span>
							<strong><strong>网络硬盘</strong></strong></a></li>
					<li>
						<a href="javascript:void(0);" class="activetitle" onclick="javascript:jDbank.module.getLinkList();">
							<span class="leftlinkicon"></span>
							<strong><strong>文件外链</strong></strong></a></li>
					<li id="stationOnclickID">
						<a href="javascript:void(0);" class="activetitle">
							<span class="leftsideicon"></span>
							<strong><strong>文件快递<em id="unreadMessageNum1"></em></strong></strong></a></li>
					<li id="linkManOnclickID">
						<a href="javascript:void(0);" class="activetitle">
							<span class="contacticon"></span>
							<strong><strong>联系人</strong></strong></a></li>
				</ul>
			</div>
			<!--div id="dbkspacestauts" class="leftmemory">
    <div class="dbkdiskspace" id="dbkdiskspacepercent" title="已使用110M,35%">
        <em>容量：</em>
        <div class="leftmemoryborder"><span id="userSpacePercentCss"></span></div>
        <em id="sparesize"></em>
    </div>
</div-->
			<div id="dbkspacestauts">
				<div id="dbkdiskspacepercent" class="size clearfix" title="总容量3G，已使用4G，请删除文件，或在设置-商城中升级、扩容">
					<strong>容量：</strong>
					<p class="clearfix sizebar">
						<span id="userSpacePercentCss">
							<span></span>
						</span>
					</p>
					<em id="sparesize">3G</em> <ins class="tips">小气泡提示</ins>
				</div>
			</div>
		</div>
		<div id="dbkdrager" class="sidescroll">
			<span></span>
		</div>
	</body>
	</html>
	<div id="dbkdiskcontainer" class="contents" style="display: none;">
		<!--include operator.htm start-->
		<div class="datetitle">
			<h1 id="netDiskNavigationbars">
				<span>网络硬盘</span><em class="currentitle"></em></h1>
			<ul>
				<li>
					<input id="newbutton" type="button" class="addfilebutton" onclick="javascript:addCatalog();" /></li>
				<li>
					<input id="uploadbutton" type="button" class="uploadbutton" onclick="javascript:showUploadWindow();" /></li>
				<li>
					<input id="sendbutton" type="button" class="sendbutton" onclick="javascript:if(!fileFlagNetDisk()){return false;};jDbank.ui.sleep();setTimeout('goDeliverFileFromNetDisk();',500);setviewModer();" /></li>
				<li>
					<input id="deletebutton" type="button" class="delbutton" onclick="javascript:if(!getSelectFileSystemType()){return false;};if(diskFileList||diskFileListImg){var filelist = jDbank.data.getGlobal('filelistdisplay') == '1' ? diskFileListImg : diskFileList;filelist.deleteSelectedItems(false);}" /></li>
				<li>
					<input id="movebutton" type="button" class="movebutton" onclick="javascript:openMoveFilesTreeFromNetDisk();" /></li>
				<li>
					<input id="copybutton" type="button" class="copybutton" onclick="javascript:openCopyFilesTreeFromNetDisk();" /></li>
				<li>
					<input id="linkbutton" type="button" class="linkbutton" onclick="javascript:jDbank.module.getFileLinks('/ajax/getExternalLink.action');" /></li>
				<!--li><input id="reviewbutton" type="button" class="reviewbutton" onclick="javascript:openSelectListDiv();" /></li-->
			</ul>
		</div>
		<div class="dbmenu dbwindiv" id="dbreviewmenu">
			<div>
				<p>
					<a class="fmreviewlist selected" href="javascript:jDbank.data.setGlobal('filelistdisplay', '0');closeSelectListDiv();ajaxRefreshFileList();">列表</a> <a class="fmreviewpic" href="javascript:jDbank.data.setGlobal('filelistdisplay', '1');closeSelectListDiv();ajaxRefreshFileList();">缩略图</a>
				</p>
			</div>
		</div>
		<script>
			function openSelectListDiv() {
				document.getElementById('dbreviewmenu').style.display = 'block';
			}
			function closeSelectListDiv() {
				if (jDbank.data.getGlobal('filelistdisplay') == '1') {
					document.getElementById('dbreviewmenu').getElementsByTagName('a')[0].className = "fmreviewlist";
					document.getElementById('dbreviewmenu').getElementsByTagName('a')[1].className = "fmreviewpic selected";
				} else {
					document.getElementById('dbreviewmenu').getElementsByTagName('a')[0].className = "fmreviewlist selected";
					document.getElementById('dbreviewmenu').getElementsByTagName('a')[1].className = "fmreviewpic";
				}

				document.getElementById('dbreviewmenu').style.display = 'none';
			}
		</script>
		<!--include operator.htm end-->
		<div id="dbkfolderandfiles" class="dbtable" serviceurl="/ajax/deleteResource.action" renameurl="/ajax/renameResource.action">
			<div class="mhead">
				<table>
					<colgroup>
						<col>
						<col width="106">
						<col width="106">
						<col width="180" class="recol">
					</colgroup>
					<thead>
						<tr>
							<th id="filetitle" class="filetitle" onclick="jDbank.module.diskTableSort(this,0)">
								<span>文件名<em></em></span>
							</th>
							<th id="filesize" class="filesize bg" onclick="jDbank.module.diskTableSort(this,1)">
								<span>大小<em></em></span>
							</th>
							<th id="filetype" class="bg" onclick="jDbank.module.diskTableSort(this,2)">
								<span>类型<em></em></span>
							</th>
							<th id="fileuptime" class="bg" onclick="jDbank.module.diskTableSort(this,3)">
								<span>上传时间<em class="desc"></em></span>
							</th>
						</tr>
					</thead>
				</table>
				<div id="dbkfolderandfilescurrent" class="currentline">
				</div>
			</div>
			<div class="mbody" id="dbkdisklist">
				<!-- 动态更新目录、文件混排列表  -->
			</div>
		</div>
		<div id="dbklistimgs" class="dbtable">
			<div class="mbody" id="dbkdisklistimg" serviceurl="/ajax/deleteResource.action" renameurl="/ajax/renameResource.action">
			</div>
		</div>
		<div id="netdisk_status" class="statusbar">
			<span class="status-size">当前文件夹大小：0 KB</span>
			<span class="status-num">共有文件夹0个，文件0个</span>
		</div>
	</div>
	<div id="dbfoldermenu" class="dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmsharefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.openPicInFlash();">打开</a> <a class="fmaddfolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.openPicInFlash();javascript:addCatalog();">新建目录</a> <a class="fmupfile" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.openPicInFlash();javascript:showUploadWindow();">上传文件</a>
				<span></span>
				<a class="fmsharefolder" href="javascript: share(jDbank.data.getGlobal('gUpLoadFileCatalogIdFile'));">共享</a> <a class="fmnosharefolder" href="javascript: cancelShare(jDbank.data.getGlobal('gUpLoadFileCatalogIdFile'));">取消共享</a>
				<span></span>
				<a class="fmmovefolder" href="javascript:openMoveFilesTreeFromNetDisk();">移动到...</a> <a class="fmcopyfolder" href="javascript:openCopyFilesTreeFromNetDisk();">复制到...</a> <a class="fmrenamefolder" href="/ajax/renameResource.action" onclick="javascript:if(folderFlagRight(this) && jDbank.data.getGlobal('diskFileList_clickNode')){var filelist = jDbank.data.getGlobal('filelistdisplay') == '1' ? diskFileListImg : diskFileList; filelist.set('renameFolderService',this.href); filelist.readyToRename(jDbank.data.getGlobal('diskFileList_clickNode'));return false;}">重命名目录</a> <a class="fmdelfolder" href="javascript:;" onclick="javascript:if(folderFlagRight(this)){jDbank.data.getGlobal('filelistdisplay') == '1' ? diskFileListImg.deleteSelectedItems(false) : diskFileList.deleteSelectedItems(false);}">删除</a>
			</p>
		</div>
	</div>
	<div id="dbfilemenu" class="dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmsharefolder disabled" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.openPicInFlash();">打开</a> <a id="downloadFileLink" class="fmsharefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.downloadFile();">下载</a> <a id="clientDownloadFileLink" class="fmshareall" style="display: none" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}if(dbankClientDownloader){dbankClientDownloader.clientDownloadFiles(dbankClientDownloader.netDiskListPageCallback);}">客户端批量下载</a> <a class="fmsharefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}return goDeliverFileFromNetDisk();">发送</a> <a id="dbkresourcerightmenu" class="fmnosharefolder" href="/ajax/getExternalLink.action" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.module.getFileLinks(this.href);return false;">获取链接</a>
				<span></span>
				<a class="fmmovefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}openMoveFilesTreeFromNetDisk();">移动到...</a> <a class="fmmovefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}openCopyFilesTreeFromNetDisk();">复制到...</a> <a class="fmrenamefolder" href="/ajax/renameResource.action" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}if(jDbank.data.getGlobal('diskFileList_clickNode')){var filelist = jDbank.data.getGlobal('filelistdisplay') == '1' ? diskFileListImg : diskFileList;filelist.set('renameFileService',this.href);filelist.readyToRename(jDbank.data.getGlobal('diskFileList_clickNode'));return false;}">重命名</a> <a class="fmdelfolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.data.getGlobal('filelistdisplay') == '1' ? diskFileListImg.deleteSelectedItems(false) : diskFileList.deleteSelectedItems(false);">删除</a>
			</p>
		</div>
	</div>
	<div id="dblinkmanagemenu" class="dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmmovefolder" href="javascript:;" onclick="javascript:jDbank.module.editLink();">编辑</a> <a class="fmrenamefolder" href="javascript:;" onclick="javascript:jDbank.module.changeLinkStatus();">暂停</a> <a class="fmdelfolder" href="javascript:;" onclick="javascript:jDbank.module.delFileLinks();">删除</a>
			</p>
		</div>
	</div>
	<div id="dbfilemenu_inbox" class="dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmsharefolder disabled" href="javascript:;" onclick="javascript:;">打开</a> <a class="fmsharefolder" href="javascript:;" onclick="javascript:jDbank.module.downloadFile();">下载</a> <a class="fmsharefolder" href="javascript:void(0);" onclick="javascript:jDbank.data.setGlobal('userFileSystemTyped','inboxfile');goDeliverFileFromNetDisk();">发送</a> <a class="fmnosharefolder disabled" href="#" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}">获取链接</a>
				<span></span>
				<a class="fmmovefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.data.setGlobal('userFileSystemTyped','inboxfile');openMoveFilesTreeFromFileDeliverFiles();">移动到...</a> <a class="fmmovefolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.data.setGlobal('userFileSystemTyped','inboxfile');openCopyFilesTreeFromFileDeliver();">复制到...</a> <a class="fmrenamefolder disabled" href="/ajax/renameResource.action" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}">重命名</a> <a class="fmdelfolder" href="javascript:;" onclick="javascript:if(jDbank.util.hasClass(this,'disabled')){return false;}jDbank.data.setGlobal('userFileSystemTyped','inboxfile');deleteFileFromMsg();">删除</a>
			</p>
		</div>
	</div>
	<div id="typeselector" style="display: none; position: absolute;">
		<ul>
			<li type=".*">
				<a href="#">All File(*.*)</a></li>
			<li type="*.gif">
				<a href="#">Gif文件(.gif)</a></li>
			<li type=".jpg">
				<a href="#">JPG(.jpg)</a></li>
			<li type=".txt">
				<a href="#">TXT(.txt)</a></li>
			<li type=".png">
				<a href="#">PNG(.png)</a></li>
			<li type=".zip">
				<a href="#">ZIP(.zip)</a></li>
		</ul>
	</div>
	<div id="dbklinkmanage" class="contents" style="display: none;">
		<!--include operator.htm start-->
		<div id="dbklinkmanageoper" class="datetitle">
			<h1>
				<span>文件外链</span><em class="currentitle"></em></h1>
			<ul>
				<li>
					<input type="button" class="addlinkbutton" onclick="javascript:jDbank.module.createLink();" /></li>
				<li>
					<input type="button" class="editbutton" onclick="javascript:jDbank.module.editLink(true);" /></li>
				<li>
					<input type="button" class="stopbutton" onclick="javascript:jDbank.module.changeLinkStatus(3,true);" /></li>
				<li>
					<input type="button" class="resumebutton" onclick="javascript:jDbank.module.changeLinkStatus(0,true);" /></li>
				<li>
					<input type="button" class="delbutton" onclick="javascript:jDbank.module.delFileLinks();" /></li>
			</ul>
		</div>
		<!--include operator.htm end-->
		<div id="dbkfilelinklist" class="dbtable" serviceurl="/service/?action=delSource" listurl="/ajax/getAllExternalLink.action" detailurl="/ajax/getExternalLinkDetail.action">
			<div class="mhead">
				<table>
					<colgroup>
						<col>
						<col width="90">
						<col width="106">
						<col width="180" class="createtime recol">
					</colgroup>
					<thead>
						<tr>
							<th class="filetitle nohand" onclick="jDbank.module.linkTableSort(this,0,'dbkfilelinklist');">
								<span>外链名称<em></em></span>
							</th>
							<th class="filesize bg nohand" onclick="jDbank.module.linkTableSort(this,1,'dbkfilelinklist');">
								<span>已使用流量<em></em></span>
							</th>
							<th class="bg nohand" onclick="jDbank.module.linkTableSort(this,2,'dbkfilelinklist');">
								<span>链接状态<em></em></span>
							</th>
							<th class="bg nohand" onclick="jDbank.module.linkTableSort(this,3,'dbkfilelinklist');">
								<span>创建时间<em class="desc"></em></span>
							</th>
						</tr>
					</thead>
				</table>
				<div id="dbkfilelinklistcurrent" class="currentline">
				</div>
			</div>
			<div class="mbody">
				<table>
					<tbody>
						<tr>
							<td>
								&nbsp;
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
		<div class="statusbar">
			<span class="status-size"></span>
			<span class="status-num"></span>
		</div>
	</div>
	<script type="text/javascript">
		function refreshNetDisk(focus, treeType) {
			jDbank.data.setGlobal('orderName', 'postdate');
			jDbank.data.setGlobal('orderType', 'desc');
			jDbank.data.setGlobal('totalPage', '1');
			jDbank.data.setGlobal('currentPage', '1');
			jDbank.data.setGlobal('counts', '-1');
			jQuery("#checkAllOrNot").attr('checked', '');
			if (jDbank.data.getGlobal('mytable')) {
				jDbank.data.getGlobal('mytable').refresh();
			}

			/*
			* ajax 动态更新网盘列表信息，包括文件列表、翻页、列表头部、导航、用户网盘空间
			*/
			ajaxInitTree();
			ajaxInitShare();

			var tree = jDbank.data.getGlobal(treeType);
			if (!tree) {
				tree = jDbank.data.getGlobal("dbtree");
			}
			var node;
			if (!focus) {
				//jDbank.data.setGlobal("gUpLoadFileCatalogId",tree.getFolderId());
				//node = document.getElementById(tree.idPre+tree.getFolderId());
				jDbank.data.setGlobal("gUpLoadFileCatalogId", tree.rootId);
				node = document.getElementById(tree.idPre + tree.rootId);
			} else {
				jDbank.data.setGlobal("gUpLoadFileCatalogId", focus);
				node = document.getElementById(tree.idPre + focus);
			} //共享链接进入，如果当前文件夹已经被取消共享，焦点定位到共享文件夹
			if (node) {
				tree.setFocusNode(node);
			} else {
				if ('0' == $("#poperror").val()) {
					jDbank.ui.showMsg("你访问的共享文件夹，已被删除，或您已被取消共享权限!", true);
					$("#poperror").val("1");
				}
				var a = document.getElementById(tree.idPre + jDbank.data.getGlobal("sharerootid"));
				var tree1 = jDbank.data.getGlobal('dbtree');
				jDbank('#' + tree1.idPre + tree1.rootId).find('span.on').removeClass('on');
				tree.setFocusNode(a);
			}

		}
		/*
		* 刷新网盘列表导航条
		*/
		function refreshNetDiskNavigationbars() {
			var focusNode = jDbank.data.getGlobal("tree").getSelectedFolder();
			refresFocuPath(jDbank.data.getGlobal("tree").getPath(focusNode));
		}
 
 
	</script>
	<!-- 文件快递文件列表视图 -->
	<input id="viewModer" type="hidden" value="">
	<div id="dbktranscontainer" class="contents" style="display: none;">
		<!--center><br/><br/><img src="http://st2.dbank.com/images/loading.gif" alt='loading' name='loading'/></center-->
		<div id="dbktransoperation" class="datetitle">
			<h1>
				<span>文件快递</span><em class="currentitle"></em><a href="#">收件箱</a></h1>
			<ul>
				<li>
					<input type="button" class="forwardbutton" onclick="javascript:jDbank.data.setGlobal('userFileSystemTyped','inboxfile');goDeliverFileFromNetDisk();" />
				</li>
				<li>
					<input type="button" class="delbutton" onclick="javascript:jDbank.data.setGlobal('userFileSystemTyped','inboxfile');deleteFileFromMsg();" />
				</li>
				<li>
					<input type="button" class="movebutton" onclick="javascript:jDbank.data.setGlobal('userFileSystemTyped','inboxfile');openMoveFilesTreeFromFileDeliverFiles();" />
				</li>
				<!--li>
          <input type="button" class="copybutton" onclick="javascript: openCopyFilesTreeFromFileDeliver();" id="copybutton" title="复制到..."/>
      </li-->
				<li>
					<input type="button" class="selectbutton" onclick="dSwitcher();" />
				</li>
			</ul>
		</div>
		<div id="dbktranstable" class="dbtable">
			<div class="mhead">
				<table>
					<colgroup>
						<col>
						<col width="106">
						<col width="106">
						<col width="180" class="recol">
					</colgroup>
					<thead>
						<tr>
							<th class="filetitle">
								<span>文件名<em></em></span>
							</th>
							<th id="dbkmsgtableer" class="bg">
								<span>发件人<em></em></span>
							</th>
							<th class="filesize1 bg">
								<span>大小<em></em></span>
							</th>
							<th class="bg">
								<span>接收时间<em></em></span>
							</th>
						</tr>
					</thead>
				</table>
				<div id="dbktranstablecurrent" class="currentline" style="display: none;">
				</div>
			</div>
			<div class="mbody" id="msgreceivefilelist">
				<!--收件箱的文件列表 /view/msg/filelistinbox.htm-->
			</div>
		</div>
		<script type="text/javascript"> 
 
		</script>
		<div id="msgfile_status" class="statusbar">
			<span class="status-size"></span>
			<span class="status-num"></span>
		</div>
	</div>
	<!-- 文件快递消息视图列表页面-->
	<div id="dbkmessagecontainer" class="contents" style="display: none;">
		<center>
			<br />
			<br />
			<img src="http://st2.dbank.com/images/loading.gif" alt='loading' name='loading' /></center>
	</div>
	<!-- 文件快递发送页面 -->
	<div id="dbksendmsgcontainer" class="mailbox" style="bottom: auto; top: -9999px;">
		<div id="dbksendmsgoperation" class="datetitle">
			<h1>
				<span>文件快递</span><em class="currentitle"></em>发送文件</h1>
			<ul>
				<li>
					<input id="deliverySendBtn" type="button" class="sendiconbutton" onclick="javascript:if (!jDbank.module.detecPlugin()) {sendfiles();}else{jDbank.module.sendFiles();}" />
				</li>
				<li>
					<input type="button" class="closebutton" onclick="javascript:fileDeliverMenuControl(5);" />
				</li>
			</ul>
		</div>
		<!--include file express start-->
		<div id="dbksendfile" class="sendcontentmain" serviceurl="/ajax/deliverFile.action">
			<table>
				<tr>
					<td class="leftsidewidth">
						<div class="sendcontentmainleft">
							<table>
								<tr>
									<th>
										发件人
									</th>
									<td>
										<input type="text" id="deliverFrom" maxlength="32" />
									</td>
								</tr>
								<tr>
									<th>
										收件人
									</th>
									<td>
										<div id="dbkemailcontainerbg">
											<div id="dbkemailcontainer">
												<div class="detext gray">
													请输入邮箱，多个联系人可用分号( ; )隔开</div>
												<div class="detext">
													<input type="text" value="" style="ime-mode: disabled" /></div>
											</div>
											<input type="hidden" value="" />
										</div>
									</td>
								</tr>
								<tr>
									<th>
										主题
									</th>
									<td>
										<input id="send_title" type="text" maxlength="250" />
									</td>
								</tr>
								<tr>
									<th class="top">
										正文
									</th>
									<td id="forwardContent">
										<textarea class="gray" id="send_content" rows="3" cols="3" onkeyup="return validateTextarea(this,event);" onfocus="javascript:if(this.value == '正文最多可输入500字。'){this.value='';this.className='';}" maxlength="500">正文最多可输入500字。</textarea>
									</td>
								</tr>
								<tr>
									<th>
									</th>
									<td>
										<div class="dbkfilesize" id="deliveryfilesize">
											附件总大小：<strong id="attachment_total_size" totalsize="0"></strong>/剩余空间：<strong id="sendcontent_size" leftsize="0"></strong>
											<input type="hidden" id="attachment_allow_size" />
										</div>
										<span id="swfuploadcontainer_attach" class="swfupload"><a id="add_attachment">添加附件</a></span>
										<a id="dbkUploadPlugin_attach" href="javascript:void(0);" onclick="javascript:jDbank.data.setGlobal('ieplugin-flag','1');dBankUploader.selectFiles();">
											<span class="paperclip"></span>
											添加附件</a> - <a id="dlvBrowserNetdisk" href="javascript:void(0);">网盘附件</a>
									</td>
								</tr>
								<tr>
									<th>
									</th>
									<td>
										<div id="sendfile_list_div" class="addannex" style="display: none">
											<ul id="send_file_list">
											</ul>
											<ul id="send_error_list">
											</ul>
										</div>
									</td>
								</tr>
							</table>
						</div>
					</td>
					<td>
						<div id="dbksimplelinkselector" class="sendcontentmainright">
						</div>
					</td>
				</tr>
			</table>
		</div>
		<div class="statusbar">
			<span class="status-size"></span>
			<span class="status-num"></span>
		</div>
	</div>
	<div id="confirm_leave" class="framemodulesendshow" style="display: none;">
		<div class="framemodule framemodulesend">
			<div class="frameheader frameheadernor">
				<h1>
					温馨提示</h1>
				<a href="javascript:void(0);" onclick="javascript:hideLeaveDeliverAlertUI();" class="close"></a>
			</div>
			<div class="framecentersend">
				<p>
					<span></span>
					<cite>确定要离开该页面吗？<br />
						这将会导致发送页面上未保存的数据丢失，确定？<br />
						按“确定”继续，或按“取消”留在当前页面。</cite></p>
				<div class="framefoot mainbtn">
					<input type="button" class="btn cancelbutton" value="" onclick="javascript:hideLeaveDeliverAlertUI();" />
					<input type="button" class="btn confirmbutton" value="" onclick="javascript:SureLeaveTo();" />
				</div>
			</div>
		</div>
	</div>
	<div id="dbkalertwin" class="framemodulesendshow" style="display: none">
		<div class="framemodule framemodulesend">
			<div class="frameheader frameheadernor">
				<h1>
					温馨提示</h1>
				<a href="javascript:removeOutOfSizeFiles();" class="close"></a>
			</div>
			<div class="framecentersend">
				<!--span></span-->
				<p id="attachment_error">
				</p>
				<div class="framefoot mainbtn">
					<input type="button" class="btn largefilesbutton" value="" onclick="javascript:removeOutOfSizeFiles();" />
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function refreshFileDeliver() {
			var childs = jQuery("#dbkmessagecontainer").children();
			if (childs.length > 0) {
				return;
			}
		}
		function dSwitcher() {
			setTimeout(function() {
				var YUI = miniYUI, oPosp = null, dTemp;
				var dSwitcher = document.getElementById('dbkfilemsgswitch');
				var dTar = jQuery('.selectbutton');
				for (var i = 0; i < dTar.length; i++) {
					var temp = jQuery(dTar[i]);
					if (temp.parents("div.contents").attr("style").indexOf("block") != -1) {
						dTar = temp;
					}
				}
				var oPos = dTar.position();
				jDbank.ui.showSubWindow(dSwitcher, false);
				if (document.getElementById('dbktranscontainer').style.display != 'none') {
					dTemp = document.getElementById('dbktranscontainer');
					if (document.all) {
						oPosp = { left: parseInt(dTemp.currentStyle['borderLeftWidth'].replace('px', '')) - 2, top: parseInt(dTemp.currentStyle['borderTopWidth'].replace('px', '')) - 2 };
					} else {
						oPosp = YUI.getPosition(dTemp);
					}
				} else {
					dTemp = document.getElementById('dbkmessagecontainer');
					if (document.all) {
						oPosp = { left: parseInt(dTemp.currentStyle['borderLeftWidth'].replace('px', '')) - 2, top: parseInt(dTemp.currentStyle['borderTopWidth'].replace('px', '')) - 2 };
					} else {
						oPosp = YUI.getPosition(document.getElementById('dbkmessagecontainer'));
					}
				}
				dSwitcher.style.left = oPos.left + oPosp.left + 4 + 'px';
				dSwitcher.style.top = oPos.top + oPosp.top + jDbank(dTar).height() + 8 + 'px';
			}, 50);

			var msgclass = jQuery("#messagesShowsId").attr("class", '');
			var fileclass = jQuery("#filesShowId").attr("class", '');
			if (document.getElementById("dbktranscontainer").style.display != 'none') {
				jQuery("#filesShowId").attr("class", "selected");
			}
			if (document.getElementById("dbkmessagecontainer").style.display != 'none') {
				jQuery("#messagesShowsId").attr("class", "selected");
			}
		}
		/*
		* 
		* 获取发送文件页面
		*/
		function ajaxInitFileDeliver(dfileids, clear) {
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/initFileDeliver.action";
			var params = '';
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'html',
				timeout: 6000,
				async: false,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (data.indexOf("returnUrl") != -1) {
						if (outSessionValue(eval("(" + data + ")"))) {
							return;
						}
					}
					jQuery("#dbksimplelinkselector").html(data);

					//文件快递页面，添加联系人
					miniYUI.doWhileExist('dbksimpleselector', jDbank.module.simpleSelectorInit);
					miniYUI.doWhileExist('dbksimplelinkselector', jDbank.module.searchSimpleInit);

					ajaxGetAllLinkMan();
					//初始化文件递送task
					jDbank.data.deleteGlobal("dbank_task");
					if (jDbank.data.getGlobal("dbank_task") == null) {
						if (dfileids) {
							initSendTask(dfileids);
						} else {
							initSendTask("");
						}

						if (dBankUploader) {	//change plugin's upload type by Tan @2009.11.28
							dBankUploader.uploadType = dBankUploader.setting.UPLOADTYPE_MANUAL;
							dBankUploader.Upload_autoStart = false;
							dBankUploader.Upload_attachment = true;
							dBankUploader.fileSaveType = getUserFileSystemType();
							jDbank.module.initFlashUploader();
						}

						// 清空收件人数据
						if (clear) {
							if (emailAutoComplete) {
								emailAutoComplete.refresh();
							}
						}
					}

				}
			});
		}

		/*
		* 
		* 获取所有联系人
		*/
		function ajaxGetAllLinkMan() {
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/ajaxGetAllLinkMan.action";
			var params = '';
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'json',
				timeout: 6000,
				async: false,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (data.indexOf("returnUrl") != -1) {
						if (outSessionValue(eval("(" + data + ")"))) {
							return;
						}
					}
					mySimpleSelector.data = data;
				}
			});
		}

		var mySimpleSelector;
		jDbank.module.simpleSelectorInit = function(module) {    //add link from simple link selector
			var YUI = miniYUI, data, firstNode, dLi;
			var dLis, i = 0, j = 0, k = 0;
			var arrId, arrData = new Array();
			var dCounter = document.getElementById('dbksharesetcounter');

			mySimpleSelector = new jDbank.ui.multiMailList(module.id);
			mySimpleSelector.idPre = 'simple';
			mySimpleSelector.set('icoClass', '');
			mySimpleSelector.set('defaultGroupId', 1);
			mySimpleSelector.set('maxNum', 10000);
			//init data setting

			var fnAddInRight = function(eventObj) {
				if (this._data.selectedNum >= this._data.maxNum) { jDbank.ui.showMsg('已超出 ' + this._data.maxNum + ' 个联系人的限制'); return; }
				var data = this.getNodeData(eventObj.clickNode);
				if (emailAutoComplete && !YUI.hasClass(eventObj.clickNode, 'selected')) {
					emailAutoComplete.clearTip();
					emailAutoComplete.addMail(data.name, data.email);
					this._data.selectedNum++;
				} else if (emailAutoComplete) {
					emailAutoComplete.removeMail(data.email);
					this._data.selectedNum--;
				}
				return true;
			};

			mySimpleSelector.bind('click', fnAddInRight);
			mySimpleSelector.init();
		};


		jDbank.module.searchFileDeliverLinkFromData = function(data, keyword) { //search link from and this is a multilinklist instance
			if (typeof (data) != 'object') { return 'we need an object data.'; }
			var YUI = miniYUI;
			var arr = new Array();
			var sId = '';
			keyword = keyword.toLowerCase();
			for (var key = 0; key < data.length && data[key]; key++) {
				if (data[key].name.toLowerCase().indexOf(keyword) > -1 || data[key].pinyin.toLowerCase().indexOf(keyword) > -1 || data[key].email.toLowerCase().indexOf(keyword) > -1) {
					sId = '_' + this.get('searchGroupId') + '_' + data[key].id;
					arr[arr.length] = YUI.clone(data[key]);
					arr[arr.length - 1].id = sId;
				}
			}

			if (arr.length > 0 && this.get('searchUl')) {
				this.get('searchUl').innerHTML = '';
				this.appendNode(arr, false, this.get('searchUl'));
			} else {
				this.get('searchUl').innerHTML = '<li>无相关记录.</li>';
			}
		};

		jDbank.module.searchSimpleInit = function(module) { //search mail
			var dTar, dLis;
			var YUI = miniYUI;
			var timer = null;

			var dDiv = document.getElementById('dbksimpleselector').getElementsByTagName('div')[0];
			var dUl = document.getElementById('simple_0');
			var dSearchInput = YUI.getElementsByClassName('contactext', 'input', module)[0];
			var dSearchBtn = YUI.getNextSibling(dSearchInput);

			var fnSearchIt = function() {
				if (dDiv.style.display != 'none') {
					dDiv.style.display = 'none';
					dUl.style.display = 'block';
					dSearchBtn.className = 'clearbutton';
				}

				//search from data after a delay time
				if (mySimpleSelector) {
					mySimpleSelector.get('searchUl').innerHTML = 'loading..';
					if (timer) { clearTimeout(timer); }
					timer = setTimeout(function() {
						jDbank.module.searchFileDeliverLinkFromData.call(mySimpleSelector, mySimpleSelector.data, dSearchInput.value);
					}, 500);
				}
			};

			YUI.on(module, 'click', function(e) {
				dTar = YUI.getTarget(e);

				if (dTar.tagName.toLowerCase() == 'input' && dTar.className == 'clearbutton') {
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
					dSearchInput.value = '';
				} else if (dTar.tagName.toLowerCase() == 'input' && dTar.className == 'contactbutton') {
					fnSearchIt();
				}
			});

			YUI.on(dSearchInput, 'focus', function(e) {
				if (dSearchInput.value == '查找联系人') {
					dSearchInput.value = '';
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
				}
			});

			YUI.on(dSearchInput, 'keyup', function(e) { //search link
				if (dSearchInput.value == '') { //show back list
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
				} else { //show search list
					fnSearchIt();
				}
			});
		};

		function validateTextarea(o, event) {
			if (o.value.length > 500) {
				jDbank.ui.showMsg("您输入的字数已经超过500，无法继续输入", true);
				o.value = o.value.substring(0, 500);
				return false;
			}
			return true;
		}
	</script>
	<!--include file and msg switch module-->
	<div id="dbkfilemsgswitch" class="dbmenu dbwindiv groupmenu">
		<div>
			<p>
				<a href="javascript:void(0);" onclick="changeFileDeliverIsShow('dbkmessagecontainer');changeFileShowSelect('messagesShowsId');" id="messagesShowsId">消息视图</a> <a href="javascript:void(0);" onclick="ajaxRefreshFileDeliverList();" id="filesShowId">文件视图</a>
			</p>
		</div>
	</div>
	<!--include file and msg switch module-->
	<div id="dbklinkcontainer" class="contents" style="display: none;">
	</div>
	<script type="text/javascript">
		/*
		* 刷新联系人列表导航条
		*/
		function refreshLinkManNavigationbars() {
			document.getElementById("netDiskNavigationbars").innerHTML = "联系人";
		}

		function searchLinkMan() {
			var keyWord = document.getElementById("searchLinkManKeyWord").value;
			jDbank.data.setGlobal('orderName', 'nickname');
			jDbank.data.setGlobal('orderType', 'asc');
			jDbank.data.setGlobal('totalPage', '1');
			jDbank.data.setGlobal('currentPage', '1');
			jDbank.data.setGlobal('counts', '-1');
			jQuery("#dbklinklist").children("li").removeClass('on');
			ajaxRefreshLinkManList(keyWord, '', '', '');
			return false;
		}
	</script>
	<!-- 联系人工具箱 -->
	<div class="mailbox" id="linkManBox" style="display: none;">
		<div class="datetitle" id="datetitleId">
		</div>
		<div class="contentsm" id="exportLinkMan" style="display: none;">
			<div class="portmain">
				<h1>
					导出联系人</h1>
				<p>
					把联系人导出，并按csv文件(*.csv)格式保存。<br />
					保存后文件名为：<em>address.csv</em></p>
				<div class="portlink">
					<input type="button" class="exportbutton" onclick="javascript:exportLinkMan();" title="立即导出" />
					<input type="button" class="cancelbutton" onclick="javascript:cancelLinkManBox();" title="取消" />
				</div>
				<div style="display: none;">
					<iframe id="CSV_Export_Frame"></iframe>
				</div>
			</div>
		</div>
		<div class="contentsm" id="importLinkManFromFiles" style="display: none;">
			<div class="portmain">
				<form id="importfileform" action="/linkman/importCSVFile.action" enctype="multipart/form-data" method="post" target="CSV_Import_Frame">
				<ul class="portmainlist">
					<li>
						<span>选择导入文件:</span>
						<div class="addfile">
							<input id="filetext" class="filestext" type="text" disabled="disabled" />
							<span class="files">
								<input id="importFile" name="csvfile" type="file" onchange="javascript:document.getElementById('filetext').value=this.value;" />
							</span>
						</div>
					</li>
					<li>
						<span>选择导入格式:</span>
						<select id="linkmanfiletype" name="filetype">
						</select>
						<em></em><a href="../help.jsp#e1" target="_blank">怎样导入</a></li>
					<li>
						<span>如果遇到重名:</span>
						<input name="csv_isskip" value="true" type="radio" checked="checked" />跳过&nbsp;&nbsp;&nbsp;&nbsp;
						<input name="csv_isskip" value="false" type="radio" />覆盖
					</li>
				</ul>
				<div class="portlink">
					<input type="button" class="importbutton" onclick="validateImportFile();" title="立即导入" />
					<input type="button" class="cancelbutton" onclick="javascript:cancelLinkManBox();" title="取消" />
				</div>
				</form>
				<div style="display: none;">
					<iframe id="CSV_Import_Frame" name="CSV_Import_Frame"></iframe>
				</div>
			</div>
		</div>
		<div class="contentsm" id="importLinkManFromOherMail" style="display: none;">
			<div class="portmain">
				<div class="bluemessage" id="importemail_onload" style="display: none">
				</div>
				<form id="importlinkmanbyemail">
				<ul class="portmainlist">
					<li>
						<span>邮 箱:</span>
						<input id="emailaccount_portmain" name="emailaccount" class="filetexts" type="text" />
						<select name="emailtype" id="emailtype" onchange="javascript:emaillistchange(this,'qqvalidatecode','qqverifyimage');">
						</select>
					</li>
					<li>
						<span>密 码:</span>
						<input id="emailaccount_password" name="password" class="filetexts" type="password" />
						<p class="pwdtips">
							DBank不会储存您的密码，请放心使用</p>
					</li>
					<li id="qqvalidatecode" style="display: none;">
						<span>验 证 码:</span>
						<input id="verifycode" name="verifycode" class="filetexts" type="text" />
						<img src="http://st2.dbank.com/images/gif.gif" alt="验证码" onclick="changeQQVerifyImage('qqverifyimage');" id="qqverifyimage" /> <a href="javascript:changeQQVerifyImage('qqverifyimage');" class="code">看不清,换一张</a>
					</li>
					<li>
						<span>如果遇到重名:</span>
						<input name="isskip" value="true" type="radio" checked="checked" />跳过&nbsp;&nbsp;&nbsp;&nbsp;
						<input name="isskip" value="false" type="radio" />覆盖
					</li>
				</ul>
				</form>
				<div class="portlink">
					<input type="button" class="importbutton" onclick="javascript:importEmailLinkMan(this);" id="importemail" title="立即导入" />
					<input type="button" class="cancelbutton" onclick="javascript:cancelLinkManBox();" id="importemailcancel" title="取消" />
				</div>
			</div>
		</div>
		<div class="contentsm" id="importLinkManFromOherMailSuccess" style="display: none;">
			<div class="portmain">
				<h1>
					导入完成</h1>
				<p>
					<em class="full"></em>导入完成。</p>
				<div class="portlinks">
					<input type="button" class="fullbutton" onclick="javascript:importEmailLinkManComplete();" title="导入完成" />
					<input type="button" class="cimportbutton" onclick="javascript:go_on_import();" title="继续导入" />
				</div>
			</div>
		</div>
	</div>
	<!--include listmenu module-->
	<div id="dbkaddlinkwin" class="framemoduleaddshow" style="margin: 0; z-index: 1000; display: none;">
		<div class="framemodule framemoduleadd">
			<div class="frameheader frameheadernor">
				<h1>
					添加联系人</h1>
				<a id="addlinkman_close" href="javascript:void(0);" class="close" onclick="javascript:closeAddLinkMan();"></a>
			</div>
			<div class="framecenteradd">
				<form id="addLinkManForm" action="#">
				<div class="framemainadd">
					<ul>
						<li>
							<span><em>*</em>联系人：</span><input id="linkmannamne" type="text" name="linkMan.nickname" class="inpuaddtext" onchange="javascript:validateName(this.value);" /></li>
						<li>
							<span><em>*</em>邮箱：</span><input id="linkmanemail" type="text" name="linkMan.email" class="inpuaddtext" onchange="javascript:validateEmail(this.value);" /></li>
						<li>
							<span>手机号码：</span><input id="linkmanmoble" type="text" name="linkMan.moble" class="inpuaddtext" onchange="javascript:validateMoble(this.value);" /></li>
						<li>
							<span>分组：</span><select id="addlinkman_select" class="inputselect" name="linkManGroup.linkmangroupid"></select>
						</li>
					</ul>
				</div>
				<div class="frameaddfoot mainbtn">
					<input type="button" class="btn cancelbutton" onclick="javascript:closeAddLinkMan();" />
					<input type="button" class="btn confirmbutton" onclick="javascript:addLinkMan();" />
				</div>
				</form>
			</div>
		</div>
		<script type="text/javascript">
			function validateEmail(email) {
				var complete = true;
				var regx = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
				if (!regx.test(email)) {
					jDbank.ui.showMsg("请输入正确的邮箱", true);
					complete = false;
				} else {
					$.ajax({
						url: jDbank.data.getGlobal("systemContextPath()") + "/ajax/checkEmailExist.action",
						cache: false,
						async: false,
						dataType: "json",
						type: "POST",
						data: "linkMan.email=" + email,
						success: function(data) {
							if (outSessionValue(data)) {
								return;
							}
							if (data.emailexist) {
								jDbank.ui.showMsg(email + "已经存在", true);
								complete = false;
							}
						}
					});
				}
				return complete;
			}
			function validateMoble(moble) {
				var complete = true;
				if (moble) {
					var regx = /^1[3,5,8]\d{9}$/;
					if (!regx.test(moble)) {
						jDbank.ui.showMsg("手机号码格式错误", true);
						complete = false;
					}
				}
				return complete;
			}

			function validateName(name) {
				if (name.length > 256) {
					jDbank.ui.showMsg("联系人名称不能超过256个长度", true);
					return false;
				}
				return true;
			}

			function checkAllInput(name, email, moble) {
				if (validateName(name)) {
					if (validateEmail(email)) {
						if (validateMoble(moble)) {
							return true;
						}
					}
				}
				return false;
			}

			function closeAddLinkMan() {
				jQuery("#addLinkManForm")[0].reset();
				jQuery("#dbkaddlinkwin").css("display", "none");
				jDbank.ui.release();
			}
 
		</script>
	</div>
	<!--include listmenu module-->
	<!-- 设置页面 -->
	<div class="mailbox" id="dbksettingcontainer" style="display: none">
		<script type="text/javascript">
			function setTabStore(name, cursel, n) {
				for (i = 1; i <= n; i++) {
					var con = document.getElementById(name + "_" + i);
					con.style.display = i == cursel ? "block" : "none";
				}
			}
 
		</script>
		<div class="datetitle">
			<h1>
				<span>设置</span></h1>
			<ul>
				<li>
					<a href="javascript:void(0)" id="two1" onclick="setTab('two',1,4)" class="active"><em>帐户</em></a></li>
				<li>
					<a href="javascript:void(0)" id="two2" onclick="setTab('two',2,4)" class="activetitle"><em>换肤</em></a></li>
				<li>
					<a href="javascript:void(0)" id="two3" onclick="setTab('two',3,4);getUserPoints();" class="activetitle"><em>积分</em></a></li>
				<li>
					<a href="javascript:void(0)" id="two4" onclick="setTab('two',4,4);Store.showStore();" class="activetitle"><em>商城</em></a></li>
			</ul>
		</div>
		<div class="contentsm">
			<div class="settingmain" id="con_two_1">
				<h1>
					帐号</h1>
				<table class="uesrpsw useraccount">
					<tbody>
						<tr>
							<th>
								邮箱：
							</th>
							<td id="useremail">
							</td>
						</tr>
					</tbody>
				</table>
				<h1>
					个人信息</h1>
				<form action="" onsubmit="return settingUpdateUserInfo()" id="personinfo">
				<table class="uesrpsw">
					<tr>
						<th>
							昵称：
						</th>
						<td>
							<input type="text" class="inputextpsw" name="nickname" value="" maxlength="32" id="confignickname" />
						</td>
					</tr>
					<tr>
						<th>
							性别：
						</th>
						<td>
							<input id="sex_0" type="radio" value="0" name="sex" id="settingSex" />&nbsp;男 &nbsp;&nbsp;
							<input id="sex_1" type="radio" value="1" name="sex" id="settingSex" />&nbsp;女 &nbsp;&nbsp;
							<input id="sex_2" type="radio" value="2" name="sex" id="settingSex" />&nbsp;保密
						</td>
					</tr>
					<tr>
						<th>
						</th>
						<td>
							<input type="submit" class="savebutton" value=" " id="configsubmit" />
						</td>
					</tr>
				</table>
				</form>
				<h1>
					修改密码</h1>
				<form action="" onsubmit="return settingUpdateUserPassword()">
				<table class="uesrpsw">
					<tr>
						<th>
							旧密码：
						</th>
						<td>
							<input type="password" class="inputextpsw" name="oldpassword" id="settingoldpassword" maxlength="32" /><em class="info" id="settingoldpasswordTip"></em>
						</td>
					</tr>
					<tr>
						<th>
							新密码：
						</th>
						<td>
							<input type="password" class="inputextpsw" name="newpassword" id="settingpassword" maxlength="32" /><em class="info" id="settingpasswordTip"></em>
						</td>
					</tr>
					<tr>
						<th>
							确认密码：
						</th>
						<td>
							<input type="password" class="inputextpsw" name="newpassword2" id="settingpassword2" maxlength="32" /><em class="info" id="settingpassword2Tip"></em>
						</td>
					</tr>
					<tr>
						<th>
						</th>
						<td>
							<input type="submit" class="savebutton" value=" " />
						</td>
					</tr>
				</table>
				</form>
			</div>
			<div id="con_two_2" class="settingmain none">
				<div class="skinmain" id="Tab3">
					<p>
						给<em id="settingPageUserName"></em>的帐户设置皮肤</p>
					<ul id="dbkstyleselector">
						<li id="settingPageCssType_default">
							<span onclick="changeDefaultCss('default');"><img src="http://st2.dbank.com/images/skin_default.jpg" /><em>默认</em></span></li>
						<li id="settingPageCssType_texture">
							<span onclick="changeDefaultCss('texture');"><img src="http://st2.dbank.com/images/skin_texture.jpg" /><em>质感</em></span></li>
					</ul>
				</div>
				<div class="skinfoot">
					<p>
						点击图片即可直接切换皮肤，切换后，设置自动保存。
					</p>
				</div>
			</div>
			<div class="settingmain none" id="con_two_3">
				<h1>
					<img src="http://st2.dbank.com/images/loading.gif" />正在加载积分数据...</h1>
			</div>
			<div class="settingmain none" id="con_two_4">
				<h1>
					<img src="http://st2.dbank.com/images/loading.gif" />正在加载商城数据...</h1>
			</div>
		</div>
		<div id="settingMsg" style="display: none;">
		</div>
	</div>
	<!-- 邀请页面 -->
	<div class="mailbox" id="dbkinvitecontainer" style="display: none">
		<script type="text/javascript" src="http://st3.dbank.com/js/autoComplete.js"></script>
		<!-- 邀请导航 -->
		<div class="datetitle">
			<h1>
				<a onclick="javascript:return changeinviteChildDiv('inviteMainEmailId','邀请其他人加入DBank');" href="javascript: void(0);">
					<span>邀请</span></a> <em class="currentitle"></em><em id="inviteSecondTextId">邀请其他人加入</em>
			</h1>
			<p class="tip">
				每成功邀请一位好友<em>+50</em></p>
		</div>
		<div id="servletcontent" style="display: none;">
		</div>
		<!-- 邀请主页面 -->
		<div class="contentsm" id="inviteMainEmailId" style="display: none;">
			<div class="invite">
				<div class="invitelink">
					<h2>
						复制链接发送给QQ/MSN好友</h2>
					<span>邀请链接<input type="text" id="inviterurl" value="" class="textlink" onclick="this.select();" onkeydown="ctrlcpastetxt(event);" readonly="readonly" />
						<input id="docopy" type="button" class="copysbutton" onclick="pastetxt();" /></span>
					<p id="pastetip" style="display: none; padding-left: 50px">
						<img src="http://st2.dbank.com/images/pastetip.gif" />信息复制成功，你可以使用CTRL+V粘贴给朋友</p>
				</div>
				<!-- 邀请邮箱通讯录中的联系人加入 -->
				<div class="invitemian">
					<h2>
						邀请多位好友获得更多积分</h2>
					<div class="invititle">
						<input type="radio" id="msnType" name="emailType" value="msn" onclick="changeEmailType(this.value);" checked="checked" />MSN
						<input type="radio" id="qqType" name="emailType" value="qq" onclick="changeEmailType(this.value);" />QQ邮箱
						<input type="radio" id="emailType" name="emailType" value="email" onclick="changeEmailType(this.value);" />Email
					</div>
					<table id="email_table" class="invitetable">
						<tr>
							<th id="emailLabel">
								MSN帐号：
							</th>
							<td>
								<div class="autoInput">
									<input class="intext" type="text" id="otheremail" onfocus="clearDefaultValue();" onblur="restoreDefaultValue();" onkeyup="jsAutoInstance.handleEvent(this.value, 'otheremail', event)" />&nbsp;<cite id="email1tip"></cite>
									<div id="autoCompleteDiv" class="autoCompleteDiv">
									</div>
								</div>
							</td>
						</tr>
						<tr>
							<th id="passwordLabel">
								MSN密码：
							</th>
							<td>
								<input class="intext" type="password" id="otherpassword" />&nbsp;<cite id="email2tip"></cite>
							</td>
						</tr>
						<tr>
							<th>
							</th>
							<td>
								<p>
									DBank不会储存你的密码，请放心使用</p>
							</td>
						</tr>
						<tr id="qqVerifyCode_tr1" style="display: none;">
							<th>
								验证码：
							</th>
							<td>
								<input id="qqvercode" name="verifycode" type="text" class="intext" />&nbsp;<cite id="email3tip"></cite>
							</td>
						</tr>
						<tr id="qqVerifyCode_tr2" style="display: none;">
							<th>
							</th>
							<td>
								<p>
									请输入下图中字符，不区分大小写</p>
							</td>
						</tr>
						<tr id="qqVerifyCode_tr3" style="display: none;">
							<th>
							</th>
							<td>
								<img src="http://st2.dbank.com/images/gif.gif" alt="验证码" onclick="changeQQVerifyImage('qqVerifyCode');" id="qqVerifyCode" /> <a href="javascript:changeQQVerifyImage('qqVerifyCode');" class="code">看不清,换一张</a>
							</td>
						</tr>
						<tr>
							<th>
							</th>
							<td class="topb">
								<input id="emailsubmit" type="button" class="invitemsnbutton" onclick="emailinviter();" />
							</td>
						</tr>
					</table>
					<div id="inviteLinkMansId" style="display: none;" class="invitelist invitelistm">
						<p>
							还有<em id="unreguser"></em>位还未注册成为DBank用户，其中：</p>
						<div class="invitelistitle">
							<span>
								<input type="checkbox" onclick="checkAll();" id="checkall" />
							</span>
							还未注册DBank的联系人</div>
						<ul id="linkmanlist">
						</ul>
						<div class="portlinks">
							<div class="comments">
								<h1>
									<em class="ficon"></em>附言：</h1>
								<textarea id="inviteComments" maxlength="500" class="textareaw"></textarea>
							</div>
							<input type="button" class="invitesendbutton" onclick="sendinviter();" />
						</div>
					</div>
					<div class="invitemes" style="display: none;" id="msnloading">
						<img src="http://st2.dbank.com/images/gif.gif" />正在寻找你的MSN联系人，请稍候... <a href="javascript: void(0);" onclick="cancelRequest();">取消</a>
						<p>
							邀请时可能造成登录的msn暂时掉线，请放心使用</p>
					</div>
					<div class="invitemes" style="display: none;" id="qqloading">
						<img src="http://st2.dbank.com/images/gif.gif" />正在寻找你的QQ联系人，请稍候... <a href="javascript: void(0);" onclick="cancelRequest();">取消</a>
						<p>
							邀请时可能造成登录的QQ暂时掉线，请放心使用</p>
					</div>
					<div class="invitemes" style="display: none;" id="emailloading">
						<img src="http://st2.dbank.com/images/gif.gif" />正在寻找你的Email联系人，请稍候... <a href="javascript: void(0);" onclick="cancelRequest();">取消</a>
					</div>
				</div>
				<div class="invitesfoot">
					<h2>
						其他邀请方式</h2>
					<ul>
						<li>
							<dl>
								<dt class="qqicons" onclick="javascript: return changeinviteChildDiv('inviteQQEmailId','邀请QQ好友加入DBank');"></dt>
								<dd>
									<a href="javascript: void(0);" onclick="javascript: return changeinviteChildDiv('inviteQQEmailId','邀请QQ好友加入DBank');">邀请QQ好友加入</a></dd>
								<dd>
									填写一个或多个QQ<em class="qqicon"></em>好友至邀请名单</dd>
							</dl>
						</li>
						<li>
							<dl>
								<dt class="sendicons" onclick="javascript: return changeinviteChildDiv('inviteSendEmailId','向指定邮箱发送邀请');"></dt>
								<dd>
									<a href="javascript: void(0);" onclick="javascript: return changeinviteChildDiv('inviteSendEmailId','向指定邮箱发送邀请');">向指定邮箱发送邀请</a></dd>
								<dd>
									填写一个或多个邮箱地址至邀请名单</dd>
							</dl>
						</li>
						<li>
							<dl>
								<dt class="dbankicons" onclick="dbankinviter();"></dt>
								<dd>
									<a href="javascript: void(0);" onclick="dbankinviter();">邀请DBank联系人加入</a></dd>
								<dd>
									导入你的DBank联系人至邀请名单</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!-- 向指定邮箱发送邀请 -->
		<div class="contentsm" id="inviteSendEmailId" style="display: none;">
			<div class="invite">
				<div class="invitesmian">
					<div class="inviteEmailbox">
						<div class="comments">
							<h1>
								对方邮箱：</h1>
							<textarea cols="2" rows="5" class="textareas" id="emailtextarea" onclick="clearcontext(this);">可填写多个邮箱，用(;)分号隔开</textarea><cite id="customemailtip"></cite>
						</div>
						<div class="comments">
							<h1>
								<em class="ficon"></em>附言：</h1>
							<textarea id="inviteCommentsEmail" maxlength="500" class="textareas textareac"></textarea>
						</div>
						<input type="button" class="invitesendbutton" onclick="customerinviter();" />
					</div>
				</div>
			</div>
		</div>
		<!-- qq邮箱邀请 -->
		<div class="contentsm" id="inviteQQEmailId" style="display: none;">
			<div class="invite">
				<div class="invitesmian">
					<div class="inviteqqbox">
						<div class="comments">
							<h1>
								对方QQ号：</h1>
							<textarea cols="2" rows="5" class="textareas" id="qqtextarea" onclick="clearcontext(this);">可填写多个QQ号码，用(;)分号隔开</textarea><cite id="qqemailtip"></cite>
						</div>
						<div class="comments">
							<h1>
								<em class="ficon"></em>附言：</h1>
							<textarea id="inviteCommentsQQ" maxlength="500" class="textareas textareac"></textarea>
						</div>
						<input type="button" class="invitesendbutton" onclick="qqinviter();" />
					</div>
				</div>
			</div>
		</div>
		<div class="contentsm" id="inviteLinkMansIdForDbank" style="display: none;">
			<div class="invite">
				<div class="invitelist invitedbank">
					<p>
						还有<em id="unreguserForDbank"></em>位还未注册成为DBank用户，其中：</p>
					<div class="invitelistitle">
						<span>
							<input type="checkbox" onclick="checkAllForDbank();" id="checkallForDbank" />
						</span>
						还未注册DBank的联系人</div>
					<ul id="linkmanlistForDbank">
					</ul>
					<div class="portlinks">
						<div class="comments">
							<h1>
								<em class="ficon"></em>附言：</h1>
							<textarea id="inviteCommentsForDbank" maxlength="500" class="textareaw"></textarea>
						</div>
						<input type="button" class="invitesendbutton" onclick="sendinviterForDbank();" />
					</div>
				</div>
			</div>
		</div>
		<!-- 邀请DBank联系人加入DBank -->
		<div class="contentsm" id="inviteDbankLinkMansId" style="display: none;">
			<div class="invite">
				<div class="bluemessage">
					<img src="http://st2.dbank.com/images/gif.gif" />正在读取DBank联系人列表，请稍候...<a href="javascript: void(0);" onclick="cancelRequest()">取消</a>
				</div>
			</div>
		</div>
		<!-- loading -->
		<div class="contentsm" id="inviterloading" style="display: none;">
			<div class="invite">
				<div class="bluemessage">
					<img src="http://st2.dbank.com/images/gif.gif" />正在处理联系人列表，请稍候...
				</div>
			</div>
		</div>
		<!-- sending -->
		<div class="contentsm" id="invitersending" style="display: none;">
			<div class="invite">
				<div class="bluemessage">
					<img src="http://st2.dbank.com/images/gif.gif" />正在发送邀请链接，请稍候...
				</div>
			</div>
		</div>
	</div>
	<!--include sendFile module-->
	<div id="dbkaddress" class="dblgedautocomplete dbwindiv" style="display: none">
		<ul>
		</ul>
	</div>
	<!--include sendFile module-->
	<!--include share module-->
	<div id="dbksharesetting" class="framemodulesettingshow">
		<div class="framemodule framemodulesettings">
			<div class="frameheader frameheadernor">
				<h1>
					共享</h1>
				<a href="javascript:void(0);" class="close" onclick="javascript:jDbank.ui.release();this.parentNode.parentNode.parentNode.style.display = 'none';"></a>
			</div>
			<div class="framesettingscenter">
				<p>
					权限设置</p>
				<div class="framesettingsmain">
					<div class="framesettingsmainleft">
						<h1 class="framesettingstitle">
							联系人
						</h1>
						<div class="framesettingsearch">
							<input type="text" class="contacsearch" value="查找联系人" /><input type="button" class="contactbutton" />
						</div>
						<div class="framesettingslist">
							<!--联系人列表{{-->
							<!--%@ include file="linkselector.html" %-->
							<div id="dbklinkselector" class="linkselector">
								<div id="linkManList4share">
								</div>
								<ul id="slink_0" class="dbksearchlist">
								</ul>
							</div>
							<!--联系人列表}}-->
						</div>
					</div>
					<div class="framesettingsmaincenter">
						<h1 class="framesettingstitle">
							已添加的共享成员
							<span>共<em id="dbksharesetcounter">25</em>人</span>
						</h1>
						<div id="dbksharedlist" class="framesettingslist">
							<!--选中联系人列表{{-->
							<!-- %@ include file="linkmaillist.html" % -->
							<div id="dbkmaillist" class="linkselector linkmails">
								<ul id="shareManList">
								</ul>
							</div>
							<!--选中联系人列表}}-->
						</div>
						<div class="framesettingadd">
							<input type="text" class="contactexts" value="" />
							<input type="button" class="addsbutton" />
						</div>
					</div>
					<div class="framesettingsmainright">
						<input id="dbkssetup" type="button" class="allowedupgraybutton" value="" onclick="javascript:if(this.className=='allowedupbutton'){jDbank.module.setMailListUp(true);}" />
						<input id="dbkssetcup" type="button" class="cancelupgraybutton" value="" onclick="javascript:if(this.className=='cancelupbutton'){jDbank.module.setMailListUp(false);}" />
						<!-- <a href="/help.jsp" target="_blank" class="question">上传权限</a> -->
						<em class="question"></em><a href="/help.jsp#e3" target="_blank">上传权限</a>
					</div>
				</div>
				<div class="framesettingsfoot mainbtn">
					<input type="button" class="btn cancelbutton" value="" onclick="javascript:jDbank.ui.release();this.parentNode.parentNode.parentNode.parentNode.style.display = 'none';" />
					<input type="button" class="btn confirmbutton" value="" onclick="saveShareMember(this);" />
				</div>
			</div>
		</div>
	</div>
	<input id="popmoder" type="hidden">
	<input id="poperror" value="0" type="hidden">
	<div id="rtips" class="gmodule grtips" style="display: none;" onmousemove="cleanTimeout();" onmouseout="srartTimeout();">
	</div>
	<!--include share module-->
	<!--include moveFile module-->
	<div id="dbkmovefile" class="framemodulemoveshow" style="position: absolute; z-index: 9999; margin: 0; display: none;">
		<div class="framemodule framemodulemove">
			<div class="frameheader">
				<h1 id="moveTypeId">
					移动到</h1>
				<a href="javascript:closeMoveTree();" class="close"></a>
			</div>
			<div class="framecenter">
				<p id="moveTypePId">
				</p>
				<div class="framemainmove">
					<div id="mydbtree2" class="dbtree">
					</div>
				</div>
				<div class="framemovefoot mainbtn">
					<p>
						要查看任何子文件夹，请单击上面的 + 号</p>
					<input type="button" onclick="javascript:closeMoveTree();" class="btn cancelbutton" value="" />
					<input type="button" class="btn removebutton" value="" id="moveTreeButtonId" />
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript"> 
var initMoveTree = function(url,params)
{
	var initData;
    jQuery.ajax({
        url:url,
        type: 'POST',
        dataType: 'json',
        data:params,
        timeout: 3000,
        async:false,
        error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
    	},
        success: function(data){
        	if(outSessionValue(data)){
		         return ;
		    }
  			if(data[0]["focusCatalog"]){
  				initData = data;
  			}
        }
    });
 
    if(!initData){
		return ;
    }
    
	var flag = 0;
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var dbtree = jDbank.data.getGlobal("tree");
	if(catalogMoveTree)
	{
		catalogMoveTree.refresh();
		flag++;
	}else
	{
		catalogMoveTree = new jDbank.ui.tree('catalogMoveTree');
		jDbank.data.setGlobal("catalogMoveTree",catalogMoveTree);
	}
	//屏蔽拖拽功能
  	catalogMoveTree.supportDrag(false);
  	//屏蔽重命名功能
	catalogMoveTree.supportRename(false);
	//屏蔽右键功能
	catalogMoveTree.supportRightMenu(false);
	//设置根目录
	var rootid = initData[0]["focusCatalog"]["parentId"]+'_'+initData[0]["focusCatalog"]["catalogId"];
	catalogMoveTree.setRootId(rootid);
	var initTreeHtml = "<div>";
	initTreeHtml +="<div class='item' id='catalogMoveTree"+rootid+"'><span class='ico opened'></span><span class='ico fopened'></span>";
    initTreeHtml +="<span class='txt'>"+initData[0]["focusCatalog"]["catalogName"]+"</span><div class='subitem' style='display:block;'></div></div></div>";
	jQuery("#mydbtree2").html(initTreeHtml);
	catalogMoveTree.setFocusNode(rootid);
	if(initData[0]["childCatalogs"])
	{
		var childCatalogStr="{";
	    jQuery.each(initData[0]["childCatalogs"],function(i,n)
	    {
	    	var parentdivid =n.parentId?rootid+"_":"";
	    	
	       if(i==0)
		   {
	    	   childCatalogStr+= "'"+rootid+"_"+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"]+ "','sUid':'"+n["userId"] + "','systemType':'"+n["systemType"]+ "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
	        }else
		    {
	        	childCatalogStr+= ",'"+rootid+"_"+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"] + "','sUid':'"+n["userId"]+ "','systemType':'"+n["systemType"]+ "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
	        }	         
	    });
	    childCatalogStr+="}";
	}
	
	catalogMoveTree.bind('beforeOpenNode', myMoveTreeBeforeOpenNode,catalogMoveTree,true);
	catalogMoveTree.init('mydbtree2');
	catalogMoveTree.data[rootid].sUid=initData[0]["focusCatalog"]["userId"];
	if(flag==0)
	{
		catalogMoveTree.bindevent('mydbtree2');
	}
	var obj = document.getElementById('catalogMoveTree'+rootid);
	childCatalogStr = eval('(' + childCatalogStr +  ')');
	catalogMoveTree.appendNodeFromJSON(obj, childCatalogStr);
};
 
/**
 * 点击树"+"获取下级子目录信息接口实现(moveTree)
 * @param eventObj
 * @return
 */
var myMoveTreeBeforeOpenNode = function (eventObj,catalogMoveTree)
{
	var obj = eventObj.openNode;
	var type = eventObj.subsReady;
	var folderId = catalogMoveTree.getFolderId(obj);
	getFirstChildById(folderId,obj,type);
	return true;
};
 
 
function getFirstChildById(folderId,toNode,type){
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var rootid = catalogMoveTree.getRootId();
	var dbtree = jDbank.data.getGlobal("tree");
	var url = jDbank.data.getGlobal("systemContextPath()")+'/ajax/getFirstChildById.action';
	var params = jQuery.param(
	    {
	       'resource.id':folderId,
		   'resource.sUid':catalogMoveTree.data[folderId].sUid,
		   'anticache':Math.floor(Math.random()*1000)
		});
	jQuery.ajax({
	    url:url,
	    type: 'POST',
	    dataType: 'json',
	    timeout: 3000,
	    data:params,
	    async:false,
	    error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
   		},
	    success: function(data){
	        if(outSessionValue(data)){
       			return ;
       		}
	        var dtreeObj;
	        if(dbtree){
	        	dtreeObj = document.getElementById(dbtree.idPre+folderId);
	        }
	    	var childCatalogStr="{";
	    	if(data[0]["childCatalogs"]){
		        jQuery.each(data[0]["childCatalogs"],function(i,n){
		           if(i==0){
		        	   childCatalogStr+= "'"+rootid+'_'+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"] + "','sUid':'"+n["userId"]+ "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
		            }else {
		            	childCatalogStr+= ",'"+rootid+'_'+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"]+ "','sUid':'"+n["userId"] + "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
		            }	         
		        });
	    	}
	        childCatalogStr+="}";
	        if(childCatalogStr!="{}"){
	        	var kk = eval('(' + childCatalogStr +  ')');
	        	 if (!type) {
	        		 catalogMoveTree.openNode(folderId);
	 		    	 catalogMoveTree.appendNodeFromJSON(toNode, kk);
	        	 }
	        	 
		    	if(dtreeObj)
			    {
		    		var  childs = jQuery(dtreeObj).children("div.subitem");
		    		if(childs && childs.length>0){
		    			var spans = jQuery(childs[0]).children();
		    			if(!spans || spans.length<0){
			    			dbtree.appendNodeFromJSON(dtreeObj, kk,false);
			    		}
		    		}
		    	}
	        }
	    }
	}); 
}
 
function openMoveCatalogTree(){
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var dbtree = jDbank.data.getGlobal("tree");
	var catalogid;
	var temp;
	if(dbtree){
		catalogid = dbtree.getFolderId(dbtree.getParent(dbtree.getSelectedNode(),2));//当前焦点目录的根目录id
		temp = catalogid;
		catalogid = getShareRealId(catalogid);
	}
	jQuery("#moveTypeId").html("移动到");
	jQuery("#moveTreeButtonId").addClass("removebutton");
    jQuery("#moveTreeButtonId").removeClass("copysbutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“移动”按钮");
	jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){moveCatalog();});
	//打开移动树层
	jDbank.ui.showSubWindow(document.getElementById('dbkmovefile'),false);
	jDbank.ui.disable();
   	var  url = '/ajax/getFirstChildById.action';
    var params;
    if(dbtree.idPre == 'dbtree'){
    	params = jQuery.param(
    		  	{
    				'anticache':Math.floor(Math.random()*1000)
    			});
    }else if(dbtree.idPre == 'sharetree'){
    	params = jQuery.param(
    		  	{
    		  		//'resource.id':catalogid,
    				//'resource.sUid':dbtree.data[temp].sUid,
    				'anticache':Math.floor(Math.random()*1000)
    			});
    } 
    initMoveTree(url,params);
}
function openCopyCatalogTree(){
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var dbtree = jDbank.data.getGlobal("tree");
	var catalogid;
	if(dbtree){
		catalogid = dbtree.getFolderId(dbtree.getParent(dbtree.getSelectedNode(),2));//当前焦点目录的根目录id
		catalogid = getShareRealId(catalogid);
	}
 
	if(dbtree.idPre == 'sharetree'){
		var tree = jDbank.data.getGlobal('dbtree');
		catalogid = getShareRealId(tree.getRootId());
	}
	
	jQuery("#moveTypeId").html("复制到");
	jQuery("#moveTreeButtonId").addClass("copysbutton");
    jQuery("#moveTreeButtonId").removeClass("removebutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“复制”按钮");
	jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){
			copyCatalog();
		});
	//打开移动树层
	jDbank.ui.showSubWindow(document.getElementById('dbkmovefile'),false);
	jDbank.ui.disable();
   	var  url = '/ajax/getFirstChildById.action';
    var params;
    if(dbtree.idPre == 'dbtree'){
    	params = jQuery.param(
    		  	{
    				'anticache':Math.floor(Math.random()*1000)
    			});
    }else if(dbtree.idPre == 'sharetree'){
    	params = jQuery.param(
    		  	{
    		  		'catalog.catalogId':catalogid,
    				'anticache':Math.floor(Math.random()*1000)
    			});
    } 
    initMoveTree(url,params);
}
 
/**
 * 在网盘里移动文件
 */
function openMoveFilesTreeFromNetDisk(){
	var fileIds = getSelectFileIds();
	getSelectFileTypes();
    if(!fileIds || fileIds.length<1)
	{
    	jDbank.ui.showMsg("请至少选择一条记录进行操作！",true);
        return false;
    }
    
    var fileTypes = getSelectFileSystemType();
	if(!fileTypes){
		jDbank.ui.showMsg("“我收到的文件”目录和“我的文件”目录不能移动！", true);
		return false;
	}
/*    var fileTypes = getSelectFileTypes();
	if(fileTypes && fileTypes.length > 0){
		for(var i=0;i < fileTypes.length;i++)
		{
			if(fileTypes[i] == "Directory"){
				jDbank.ui.showMsg("不能移动目录！", true);
				return false;
			}
		}
	}*/
    fileIds = null;
	var dbtree = jDbank.data.getGlobal("tree");
	var catalogid;
	if(dbtree){
		catalogid = dbtree.getFolderId(dbtree.getParent(dbtree.getSelectedNode(),2));//当前焦点目录的根目录id
		catalogid = getShareRealId(catalogid);
	}
	//打开移动树层
	var dSubWin = document.getElementById('dbkmovefile'),
		dClickBtn = document.getElementById('movebutton'),
		oPos = jDbank(dClickBtn).offset();
	jDbank.ui.showSubWindow(dSubWin,false);
	jDbank.ui.disable();
	dSubWin.style.left = oPos.left + 2 + 'px';
	dSubWin.style.top = oPos.top + jDbank(dClickBtn).height() + 3 + 'px';
	jQuery("#moveTypeId").html("移动到");
	jQuery("#moveTreeButtonId").addClass("removebutton");
    jQuery("#moveTreeButtonId").removeClass("copysbutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“移动”按钮");
   	var  url = '/ajax/getFirstChildById.action';
    var params;
    if(dbtree.idPre == 'dbtree'){
    	params = jQuery.param(
    		  	{
    				'anticache':Math.floor(Math.random()*1000)
    			});
    }else if(dbtree.idPre == 'sharetree'){
    	params = jQuery.param(
    		  	{
    		  		'catalog.catalogId':catalogid,
    				'anticache':Math.floor(Math.random()*1000)
    			});
    } 
    initMoveTree(url,params);
 
    url = '/ajax/moveResource.action';
    jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){moveFilesFromOtherSystemType(url,fileIds,getUpLoadFileCatalogId(),3,3,"netDisk");});
}
 
/**
 * 在文件快递文件视图里移动文件
 */
function openMoveFilesTreeFromFileDeliverFiles(){
	var fileIds = getSelectFileIds();
    if(!fileIds || fileIds.length<1)
	{
    	jDbank.ui.showMsg("请至少选择一条记录进行操作！",true);
        return false;
    }
    var temp ="";
 
    for(var i=0;i<fileIds.length;i++){
        if(i==0) {
            temp+= fileIds[i]+"|File";
        }else {
        	temp+="&resource.map="+fileIds[i]+"|File";
        }
    }
    
	//打开移动树层
	jDbank.ui.showSubWindow(document.getElementById('dbkmovefile'),false);
	jDbank.ui.disable();
	jQuery("#moveTypeId").html("移动到");
	jQuery("#moveTreeButtonId").addClass("removebutton");
    jQuery("#moveTreeButtonId").removeClass("copysbutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“移动”按钮");
   	var  url = '/ajax/getFirstChildById.action';
    var params = jQuery.param(
		  	{
				'anticache':Math.floor(Math.random()*1000)
			});
    initMoveTree(url,params);
 
    url = '/ajax/transferredFilesFromMsg.action';
    jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){moveFilesFromOtherSystemType(url,temp,getFileDeliverCatalog(),getFileDeliverType(),3,"fileDeliverFiles");});
}
 
/**
 * 在文件快递消息视图里移动文件
 */
function openMoveFilesTreeFromFileDeliverMsgs(fileIds){
    if(!fileIds)
	{
    	jDbank.ui.showMsg("请至少选择一条记录进行操作！",true);
        return false;
    }
	//打开移动树层
	jDbank.ui.showSubWindow(document.getElementById('dbkmovefile'),false);
	jDbank.ui.disable();
	jQuery("#moveTypeId").html("移动到");
	jQuery("#moveTreeButtonId").addClass("removebutton");
    jQuery("#moveTreeButtonId").removeClass("copysbutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“移动”按钮");
   	var  url = '/ajax/getFirstChildById.action';
    var params = jQuery.param(
		  	{
				'anticache':Math.floor(Math.random()*1000)
			});
    initMoveTree(url,params);
 
    url = '/ajax/transferredFilesFromMsg.action';
    jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){moveFilesFromOtherSystemType(url,fileIds,getFileDeliverCatalog(),getFileDeliverType(),3,"fileDeliverMsgs");});
}
 
/**
 * 在文件快递文件视图里复制文件
 */
function openCopyFilesTreeFromFileDeliver(){
	var fileIds= getSelectFileIds();
	var temp = "";
    if(!fileIds || fileIds.length<1)
	{
    	jDbank.ui.showMsg("请至少选择一条记录进行操作！",true);
        return false;
    }else {
        
        for(var i=0;i<fileIds.length;i++){
            if(i==0) {
                temp+="resource.map="+fileIds[i]+"|File";
            }else {
            	temp+="&resource.map="+fileIds[i]+"|File";
            }
        }
    }
	jQuery("#moveTypeId").html("复制到");
	jQuery("#moveTreeButtonId").addClass("copysbutton");
    jQuery("#moveTreeButtonId").removeClass("removebutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“复制”按钮");
	//打开移动树层
	jDbank.ui.showSubWindow(document.getElementById('dbkmovefile'),false);
	jDbank.ui.disable();
	
   	var  url = '/ajax/getFirstChildById.action';
    var params = jQuery.param(
  		  	{
  				'anticache':Math.floor(Math.random()*1000)
  			});
    initMoveTree(url,params);
    url = '/ajax/copyResource.action';
    jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){
		copyFilesFromOtherSystemType(url,temp,getFileDeliverType(),getFileDeliverType(),3,"fileDeliver");
		});
}
 
function openCopyFilesTreeFromNetDisk(){
	var fileIds= getSelectFileIds();
	
    if(!fileIds || fileIds.length<1)
	{
    	jDbank.ui.showMsg("请至少选择一条记录进行操作！",true);
        return false;
    }
	
	jQuery("#moveTypeId").html("复制到");
	jQuery("#moveTreeButtonId").addClass("copysbutton");
    jQuery("#moveTreeButtonId").removeClass("removebutton");
	jQuery("#moveTypePId").html("请选择目标文件夹，然后单击“复制”按钮");
	//打开移动树层
	var dSubWin = document.getElementById('dbkmovefile'),
		dClickBtn = document.getElementById('copybutton'),
		oPos = jDbank(dClickBtn).offset();
	jDbank.ui.showSubWindow(dSubWin,false);
	jDbank.ui.disable();
	dSubWin.style.left = oPos.left + 2 + 'px';
	dSubWin.style.top = oPos.top + jDbank(dClickBtn).height() + 3 + 'px';
 
   	var  url = '/ajax/getFirstChildById.action';
    var params = jQuery.param(
  		  	{
  				'anticache':Math.floor(Math.random()*1000)
  			});
    initMoveTree(url,params);
 
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var toCatalogId = catalogMoveTree.getFolderId();
	var fromCatalogId = getUpLoadFileCatalogId();
    url = '/ajax/copyResource.action';
    jQuery("#moveTreeButtonId").unbind("click");
	jQuery("#moveTreeButtonId").bind("click",function(){
		document.getElementById('dbkmovefile').style.display = 'none';
		jDbank.ui.showMsg('复制中..');
		jDbank.ui.disable();
		setTimeout(function(){
			copyFilesFromOtherSystemType(url,null,fromCatalogId,3,3,"netDisk");
		},500);
		});
}
 
function closeMoveTree()
{
	jQuery("#dbkmovefile").hide("fast");
	jDbank.ui.release();
}
 
function closeListMenue()
{
	jQuery("#dblistmenu").hide("fast");
}
 
function copyFilesFromOtherSystemType(url,fileIds,fromCatalogId,fromSystemType,toSystemType,systemType)
{
	var flag =true;
	closeMoveTree();
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var toCatalogId = catalogMoveTree.getFolderId();
	var dItems;
    if(jDbank.data.getGlobal('filelistdisplay') == '1'){
    	dItems = diskFileListImg.getSelectedItems();
    }else{
    	dItems = diskFileList.getSelectedItems();
    }
    var params;
    
	if(!fileIds)
	{	
		var dItems;
	    if(jDbank.data.getGlobal('filelistdisplay') == '1'){
	    	dItems = diskFileListImg.getSelectedItems();
	    }else{
	    	dItems = diskFileList.getSelectedItems();
	    }
		
	    params = 'resource.sUid=' + dItems[0].data.sUid     //by lane 2009.09.17修改文件复制传参
	           + '&resource.dUid=' + catalogMoveTree.data[toCatalogId].sUid
	           + '&resource.dPid=' + toCatalogId
	           + '&resource.sPid=' + dItems[0].data.catalogId
	           + '&isCheckLayers='  + 1
	           + '&isCheckChild='  + 1;
	    params = jDbank.module.getResourceIdMap() + params;
	}else {
		params = 'resource.sUid=' + catalogMoveTree.data[toCatalogId].sUid     //by lane 2009.09.17修改文件复制传参
        + '&resource.dUid=' + catalogMoveTree.data[toCatalogId].sUid
        + '&resource.dPid=' + toCatalogId
        + '&resource.sPid=' + toCatalogId
        + '&isCheckLayers='  + 1
	    + '&isCheckChild='  + 1;
 		params = '&'+ fileIds +'&'+ params;
	}
	
    jQuery.ajax({
        url:url,
        type: 'POST',
        dataType: 'json',
        timeout: 1000,
        async:false,
        cache:false,
        data:params,
        error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
    	},
        success: function(data){
	        if(outSessionValue(data)){
	        	return ;
	        }
	        if(data){
            	jDbank.ui.showMsg(data.msg,data.level);
            	flag=data.code;
            }
        }
    });
    if(flag){
    	 if(systemType=="netDisk"){
    	    	jDbank.ui.showMsg("复制成功");
    			//ajaxRefreshFileList();catalogMoveTree.data[toCatalogId].sUid
    			//alert(toCatalogId);
    			var dbtree = jDbank.data.getGlobal('tree');
    			dbtree.openSubFolders(document.getElementById(dbtree.idPre+dbtree.getFolderId()), false);
            	dbtree.openSubFolders(document.getElementById(dbtree.idPre+dbtree.getFolderId()), true);
    	    	getUserLeaveSpace();
        	    if(dbtree && getUserFileSystemType()==3) {
        	    	dbtree.setFocusNode(dbtree.getFolderId());
        	    }
        	    if(dbtree.idPre=="sharetree"){
	        		ajaxInitTree();
	            }else {
	            	//var fileIds = getSelectFileIds();
	            	//var fileTypes = getSelectFileTypes();
	            	//var folderIdFocuPathStr = folderIdFocuPath;
	            	//var folderIdFocuPathArray = folderIdFocuPath.split("_");
		            //if(folderIdFocuPathArray.length > 1)
		            //{
		            //    folderIdFocuPathStr = folderIdFocuPathArray[0]+"_"+folderIdFocuPathArray[1];
		            //}
	            	//if(fileIds && fileIds.length > 0 && fileTypes && fileTypes.length > 0){
	        		//	for(var i=0;i < fileTypes.length;i++){
	        		//		if(fileTypes[i] == 'Directory'){
	        		//			var fromFolder = document.getElementById(dbtree.idPre+folderIdFocuPathStr+'_'+fileIds[i]);
	        		//			var toFolder = document.getElementById(dbtree.idPre+toCatalogId);
	        		//			if(fromFolder && toFolder){
	        		//				dbtree.moveNode(fromFolder,toFolder,true);
	        		//			}
	        		//		}
	        		//	}
	        		//}
	            	ajaxInitShare();
	            }
    	    }else if(systemType=="fileDeliver"){
    	    	jDbank.ui.showMsg("复制成功");
    			getUserLeaveSpace();
    			ajaxRefreshFileDeliverList();
    	    }
    }
    return true;
}
 
 
var moveFilesOperations = [];
var cancleMoveFile = function(){
	var timeout = moveFilesOperations.pop();
	var tree = jDbank.data.getGlobal("tree");
	if(timeout){
		 	clearTimeout(timeout[0]);
			/*
			 * 循环隐藏tr
			 */
			var trs = timeout[4];
			for(var i=0;trs && i<trs.length;i++){
				trs[i].style.display="";
			}
	}
	if(moveFilesOperations && moveFilesOperations.length>0){
		for(var i=0;moveFilesOperations.length;i++){
			timeout = moveFilesOperations.pop();
			clearTimeout(timeout[0]);
			executeMoveFile(timeout[1],timeout[2],timeout[3],timeout[4]);
		}
	}
	jDbank.ui.showMsg("撤销成功");
	jDbank.ui.release();
};
 
var executeMoveFile = function(url,params,systemType,trs) {
	var flag = true;
    for(var i=0;trs && i<trs.length;i++){
    	trs[i].parentNode.removeChild(trs[i]); 
    }
 
    jQuery.ajax({
        url:url,
        type: 'POST',
        dataType: 'json',
        timeout: 10000,
        async:false,
        cache:false,
        data:params,
        error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
    	},
        success: function(data){
	        if(outSessionValue(data)){
	        	return ;
	        }
	        if(data){
	        	jDbank.ui.showMsg(data.msg,data.level);
	        	flag = data.code;
	        }
	        jDbank.ui.release();
        }
    });
    if(flag !=0){
    	if(systemType=="netDisk"){//在网盘移动文件
    	
    		ajaxRefreshFileList();
    		var dbtree = jDbank.data.getGlobal("tree");
    		var fileIds = jDbank.data.getGlobal("fileIds");
        	var fileTypes = jDbank.data.getGlobal("fileTypes");
        	var toCatalogId = jDbank.data.getGlobal("toCatalogId");
        	if(fileIds && fileIds.length > 0 && fileTypes && fileTypes.length > 0){
	        	var folderIdFocuPathArray = folderIdFocuPath.split("_");
		        if(folderIdFocuPathArray.length > 1)
		        {
		        	folderIdFocuPathStr = folderIdFocuPathArray[0]+"_"+folderIdFocuPathArray[1];
		        }
	        	for(var i=0;i < fileTypes.length;i++){
		        	if(fileTypes[i] == 'Directory'){
		        		var fromFolder = document.getElementById(dbtree.idPre+folderIdFocuPathStr+'_'+fileIds[i]);
		        		var toFolder = document.getElementById(dbtree.idPre+toCatalogId);
		        		if(fromFolder && toFolder){
		        			dbtree.moveNode(fromFolder,toFolder);
		        		}
		        	}
	        	}
	        	//dbtree.openSubFolders(document.getElementById(dbtree.idPre+toCatalogId), false);
	            dbtree.openSubFolders(document.getElementById(dbtree.idPre+toCatalogId), true);
	            //dbtree.setFocusNode(dbtree.getFolderId());
            }
    	}else if(systemType=="fileDeliverFiles"){//在文件快递移动文件
    		getUserLeaveSpace();
    		ajaxRefreshFileDeliverList();
    	}else if(systemType=="fileDeliverMsgs"){//在消息里移动文件
    		reopenCurrentMessage();
    		getUserLeaveSpace();
    	}
    }
	return true;
}
function moveFilesFromOtherSystemType(url,fileIds,fromCatalogId,fromSystemType,toSystemType,systemType)
{
	jDbank.data.setGlobal("fileIds",getSelectFileIds());
	jDbank.data.setGlobal("fileTypes",getSelectFileTypes());
	closeMoveTree();		
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var toCatalogId = catalogMoveTree.getFolderId();
	jDbank.data.setGlobal("toCatalogId",toCatalogId);
	var params;
	if(!fileIds)
	{
		var dItems;
	    if(jDbank.data.getGlobal('filelistdisplay') == '1'){
	    	dItems = diskFileListImg.getSelectedItems();
	    }else{
	    	dItems = diskFileList.getSelectedItems();
	    }
	    params = 'resource.sUid=' + dItems[0].data.sUid     //by lane 2009.09.17修改文件复制传参
	           + '&resource.dUid=' + catalogMoveTree.data[toCatalogId].sUid
	           + '&resource.dPid=' + toCatalogId
	           + '&resource.sPid=' + dItems[0].data.catalogId
	           + '&isCheckLayers='  + 1
	           + '&isCheckChild='  + 1;
	    params = jDbank.module.getResourceIdMap() + params;
	}else {
		params = 'resource.sUid=' + catalogMoveTree.data[toCatalogId].sUid     //by lane 2009.09.17修改文件复制传参
        + '&resource.dUid=' + catalogMoveTree.data[toCatalogId].sUid
        + '&resource.dPid=' + toCatalogId
        + '&resource.sPid=' + toCatalogId
        + '&filesType=' + fromSystemType
        + '&isCheckLayers='  + 1
	    + '&isCheckChild='  + 1;
 		params = 'resource.map='+fileIds +'&'+ params;
 		
	}
	/*
	 * 循环隐藏tr
	 */
	var trs;
	if(getUserFileSystemType()==3){
		if(jDbank.data.getGlobal('mytable')){
			trs = jDbank.data.getGlobal('mytable').getSelectedItems();
		}
	}else if(getUserFileSystemType()==2){
		if(jDbank.data.getGlobal('transTable')){
			trs = jDbank.data.getGlobal('transTable').getSelectedItems();
		}
	}
	for(var i=0;trs && i<trs.length;i++){
		trs[i].style.display="none";
	}
 
	var timeoutId = setTimeout(function(){
		executeMoveFile(url,params,systemType,null);
	},5000);
	var timeout = [];
	timeout[0] = timeoutId;
	timeout[1] = url;
	timeout[2] = params;
	timeout[3] = systemType;
	timeout[4] = trs;
	/*
	 * 记录操作
	 */
	moveFilesOperations.push(timeout);
	if(systemType=="netDisk"){//在网盘移动文件
		setTimeout(function(){
			jDbank.ui.showMsg("移动中..,<a id='operateCancelId' href='javascript: void(0);' onClick='javascript: cancleMoveFile();'>撤销</a>");
		},50);
		jDbank.ui.disable();
	}else if(systemType=="fileDeliverFiles"){//在文件快递移动文件
		setTimeout(function(){
			jDbank.ui.showMsg("移动中..,<a id='operateCancelId' href='javascript: void(0);' onClick='javascript: cancleMoveFile();'>撤销</a>");
		},50);
		jDbank.ui.disable();
	}else if(systemType=="fileDeliverMsgs"){//在消息里移动文件
		setTimeout(function(){
			jDbank.ui.showMsg("移动中..,<a id='operateCancelId' href='javascript: void(0);' onClick='javascript: cancleMoveFile();'>撤销</a>");
		},50);
		jDbank.ui.disable();
	}
	var dbtree = jDbank.data.getGlobal("dbtree");
    if(dbtree && getUserFileSystemType()==3) {
    	jQuery(jQuery("#"+dbtree.idPre+dbtree.getFolderId()).children("span.txt")[0]).attr("class","txt on");
    }
}
 
 
var moveCatalogOperations = [];
var cancleMoveCatalog = function(){
	var timeout = moveCatalogOperations.pop();
	var tree = jDbank.data.getGlobal("tree");
	if(timeout){
		 clearTimeout(timeout[3]);
		 var mFolder = document.getElementById(tree.idPre + timeout[1]);
		 var bFolder = document.getElementById(tree.idPre + timeout[0]);
		 tree.moveNode(mFolder,bFolder);
	}
	if(moveCatalogOperations!=null && moveCatalogOperations.length>0){
		for(var i=0;dragCatalogOperations.length;i++){
			timeout = moveCatalogOperations.pop();
			clearTimeout(timeout[3]);
			executeMoveNode(timeout[4],timeout[5]);
		}
	}
	jDbank.ui.showMsg("目录移动撤销成功！");
};
 
var moveCatalog = function()
{
	closeMoveTree();
	var dbtree = jDbank.data.getGlobal("tree");
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var fromCatalogId = dbtree.getFolderId();
	var fromCatalogName = dbtree.getFolderName();
	var toCatalogId = catalogMoveTree.getFolderId();
    tempParmas = jQuery.param(
    {
    	'isCheckChild':1,
    	'isCheckLayers':1,
        'isCheckRepeatCatalogName':1,
        'catalog.catalogName': fromCatalogName,
        'catalog.parentId': toCatalogId,
        'catalogIds':fromCatalogId,
        'anticache':Math.floor(Math.random()*1000)
    });			
    var temp = ajaxCheckCatalog(tempParmas);
	if(temp)
	{
	    if(temp.indexOf('catalogId')!=-1)
		{
	    	jDbank.ui.showMsg('目标目录下面有重名目录，禁止移动！',true);
	    	return false;
	    	/*
	    	if(!confirm("同目录下面有重名目录，是否覆盖？"))
		    {
			    return false;
			}
			else
			{
				temp = eval('(' + temp +  ')');
				dbtree.deleteNode(temp.catalogId);
			}*/
	    }
	    else
		{
	    	jDbank.ui.showMsg(temp,true);
			return false;
	    }
    }
    var url = '/ajax/moveResource.action';
    var params = jQuery.param(
    {
	    'resource.sUid':dbtree.data[fromCatalogId].sUid,
	    'resource.dUid':catalogMoveTree.data[toCatalogId].sUid,
	    'resource.sPid':fromCatalogId,
	    'resource.dPid':toCatalogId,
	    'resource.map':fromCatalogId+"|Directory",
	    'anticache':Math.floor(Math.random()*1000)
	});
	var timeoutId = setTimeout(function(){
		executeMoveNode(url,params);
	},10000);
	var timeout = [];
	var rootId = dbtree.getRootId();
	var retParentId = dbtree.getParentFolderId(document.getElementById(fromCatalogId));
	retParentId = getShareRealId(retParentId);
	if(retParentId == getShareRealId(rootId)){
		timeout[0]=  rootId;
	}else {
		timeout[0]=  rootId+"_" + retParentId;
	}
	timeout[1] = fromCatalogId;
	timeout[2] = toCatalogId;
	timeout[3] = timeoutId;
	timeout[4] = url;
	timeout[5] = params;
	/*
	 * 记录操作
	 */
	moveCatalogOperations.push(timeout);
 	var fromNode = document.getElementById(dbtree.idPre+fromCatalogId);
 	toCatalogId = getShareRealId(toCatalogId);
 	var toCid = getShareRootId(jDbank.data.getGlobal('gUpLoadFileCatalogId'));
 	if(rootId != '0_'+toCatalogId && rootId.indexOf("0_")!=-1){	//if not the root
		toCatalogId = toCid + "_" + toCatalogId;
 	}else {
 		toCatalogId = toCid;
 	}
	var toParentNode = document.getElementById(dbtree.idPre+toCatalogId);
	dbtree.moveNode(fromNode,toParentNode);
	dbtree.openNode(toCatalogId);
	dbtree.setFocusNode(toCatalogId);
	setTimeout(function(){
		jDbank.ui.showMsg("目录移动中..,<a id='operateCancelId' href='javascript: void(0);' onClick='javascript: cancleMoveCatalog();'>撤销</a>");
	},1000);
};
var executeMoveNode = function(url,params) {
    jQuery.ajax({
        url:url,
        type: 'POST',
        dataType: 'json',
        timeout: 3000,
        data:params,
        async:false,
        error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
    	},
        success: function(initData){
            if(outSessionValue(initData)){
		         return ;
		    }
		    if(initData){
	        	jDbank.ui.showMsg(initData.msg,initData.level);
	        	flag = initData.code;
	        }
            var dbtree = jDbank.data.getGlobal('tree');
            if(dbtree.idPre=="sharetree"){
        		ajaxInitTree();
        		ajaxInitShare();
            }else {
            	ajaxInitShare();
            }
        }
    });
};
 
function copyCatalog()
{
	closeMoveTree();
	var dbtree = jDbank.data.getGlobal("tree");
	var catalogMoveTree = jDbank.data.getGlobal("catalogMoveTree");
	var fromCatalogId = dbtree.getFolderId();
	var fromCatalogName = dbtree.getFolderName();
	var toCatalogId = catalogMoveTree.getFolderId();
    var tempParmas = jQuery.param(
    {
    	'isCheckChild':1,
    	'isCheckLayers':1,
        'isCheckRepeatCatalogName':1,
        'catalog.catalogName': fromCatalogName,
        'catalog.parentId': toCatalogId,
        'catalogIds':fromCatalogId,
        'anticache':Math.floor(Math.random()*1000)
    });			
    var temp = ajaxCheckCatalog(tempParmas);
	if(temp)
	{
	    if(temp.indexOf('catalogId')!=-1)
		{
	    	jDbank.ui.showMsg('目标目录下面有重名目录，禁止复制！',true);
	    	return false;
	    	/*
	    	if(!confirm("同目录下面有重名目录，是否覆盖？"))
		    {
			    return false;
			}
			else
			{
				temp = eval('(' + temp +  ')');
				dbtree.deleteNode(temp.catalogId);
			}*/
	    }
	    else
		{
	    	jDbank.ui.showMsg(temp,true);
			return false;
	    }
    }
    var url = '/ajax/copyResource.action';
    params = jQuery.param(
    {
	    	    'resource.sUid':dbtree.data[fromCatalogId].sUid,
	    	    'resource.dUid':catalogMoveTree.data[toCatalogId].sUid,
	    	    'resource.sPid':toCatalogId,
	    	    'resource.dPid':toCatalogId,
	    	    'resource.map':fromCatalogId+"|Directory",
	    	    'anticache':Math.floor(Math.random()*1000)
	});
	jDbank.ui.sleep();
    jQuery.ajax({
        url:url,
        type: 'POST',
        dataType: 'text',
        timeout: 3000,
        data:params,
        async:false,
        error: function(XMLHttpRequest, textStatus, errorThrown){
        	jDbank.ui.release();
			errorType(XMLHttpRequest, textStatus, errorThrown);
    	},
        success: function(data){
    		jDbank.ui.release();
      		if(data.indexOf("returnUrl")!=-1){
        		if(outSessionValue(eval("("+data+")"))){
        			return;
        		}
        	}
        	if(data.indexOf("空间大小不足")!=-1){
            	jDbank.ui.showMsg("网盘大小空间不足，禁止复制！",true);
        	}else {
        		var toNode = document.getElementById(jDbank.data.getGlobal("dbtree").idPre+toCatalogId);
          		getDbTreeFirstChildById(toCatalogId,toNode);
          		jDbank.data.getGlobal("dbtree").openNode(toCatalogId);
          		jDbank.data.getGlobal("dbtree").setFocusNode(toCatalogId);
          		getUserLeaveSpace();
            	jDbank.ui.showMsg("目录复制成功！");
                var dbtree = jDbank.data.getGlobal('tree');
                if(dbtree.idPre=="sharetree"){
            		ajaxInitTree();
            		ajaxInitShare();
                }else {
                	ajaxInitTree();//fix DANKDEV-883                	  
                	ajaxInitShare();
                }
        	}
        }
    });
    return true;
}
 
function getDbTreeFirstChildById(folderId,toNode){
	var dbtree = jDbank.data.getGlobal("dbtree");
	var rootid = dbtree.getRootId();
	var url = '/ajax/getFirstChildById.action';
	var  params = jQuery.param(
    {
    	'resource.id':folderId,
	    'anticache':Math.floor(Math.random()*1000)
    });
	jQuery.ajax({
	    url:url,
	    type: 'POST',
	    dataType: 'json',
	    timeout: 3000,
	    data:params,
	    async:false,
	    error: function(XMLHttpRequest, textStatus, errorThrown){
			errorType(XMLHttpRequest, textStatus, errorThrown);
   		},
	    success: function(data){
	        if(outSessionValue(data)){
       			return ;
       		}
	        var dtreeObj;
	        if(dbtree){
	        	dtreeObj = document.getElementById(dbtree.idPre+folderId);
	        }
	    	var childCatalogStr="{";
	        jQuery.each(data[0]["childCatalogs"],function(i,n){
	           if(i==0){
	        	   childCatalogStr+= "'"+rootid+'_'+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"] + "','sUid':'"+n["userId"]+ "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
	            }else {
	            	childCatalogStr+= ",'"+rootid+'_'+n["catalogId"] + "':{'name':'"+n["catalogName"]+"','parentid':'" + n["parentId"] + "','sUid':'"+n["userId"]+ "','havesubfolder':'"+n["isChildCatalog"]+"','data1':'data1'}";
	            }	         
	        });
	        childCatalogStr+="}";
	        if(childCatalogStr!="{}"){
	        	var kk = eval('(' + childCatalogStr +  ')');
		    	dbtree.appendNodeFromJSON(dtreeObj, kk);
	        }
	    }
	}); 
}
 
/*
 * 判定收件箱、发件箱焦点在哪个上面，inBox代表收件箱，outBox代表发件箱
*/
function getFileDeliverType(){
	var  childs = jQuery("#fileDeliverTypeId").find("a");
	for(var i=0;i<childs.length;i++){
    	if(childs[i].className=='recivebox check'){
        	return 1;
    	}else if(childs[i].className=='sendbox check'){
        	return 0;
    	}
	}
}
 
function getFileDeliverCatalog(){
	var  childs = jQuery("#fileDeliverTypeId").find("a");
	for(var i=0;i<childs.length;i++){
    	if(childs[i].className=='recivebox check'){
        	return '';
    	}else if(childs[i].className=='sendbox check'){
        	return '';
    	}
	}
}
--></script>
	<!--include moveFile module-->
	<!--include uploadFile module-->
	<div id="dbkuploadfile" class="framemoduleshow" style="margin: 0; top: -999%;" pluginurl="/view/upload/iePluginInstaller.jsp">
		<div class="framemodule">
			<div class="frameheader frameheadernor">
				<h1>
					上传文件</h1>
				<a href="javascript:void(0);" onclick="javascript:if(jQuery('#complete_button').css('display') != 'none'){complete_Button();}if(jDbank.module.clearUpload()){closeUploadWindow();}" class="close" title="关闭"></a><a href="javascript:void(0);" class="min" onclick="javascript:minimizeUploadWindow();" title="最小化"></a>
			</div>
			<div class="framecenter">
				<div id="swfuploadContainer">
					<input id="add_diskfile" type="button" class="addbutton" />
					<input id="add_dliever" type="button" class="addgraybutton" style="display: none" disabled="disabled" />
				</div>
				<input id="dbkUlopadPlugin" type="button" class="addbutton" onclick="javascript:dBankUploader.selectFiles();" />
				<div id="tasks_info_list" class="framemian">
					<div id="taskuploading">
					</div>
					<div id="taskwaiting">
					</div>
					<div id="taskerror">
					</div>
					<div id="taskcompleted">
					</div>
				</div>
				<div class="framefoot mainbtn">
					<p>
						上传文件时可以最小化本窗口，进行其他操作。</p>
					<span id="fc_button">
						<input id="close_button" type="button" class="btn closebutton" onclick="javascript:if(jDbank.module.clearUpload()){closeUploadWindow();}" />
						<input id="complete_button" type="button" class="fullbutton" onclick="javascript:complete_Button();" style="display: none" />
					</span>
				</div>
			</div>
		</div>
	</div>
	<!--include uploadFile module-->
	<!--include listmenu module-->
	<div id="dblistmenu" class="dblgedlistmenu dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmaddfolder" href="javascript:addCatalog();" id="fmaddfolder">新建目录</a> <a class="fmupfile" href="javascript:showUploadWindow();" id="fmupfile">上传文件</a>
				<span></span>
				<a class="fmsharefolder" href="javascript: share(jDbank.data.getGlobal('gUpLoadFileCatalogId'));" id="shareCatalog">共享</a> <a class="fmnosharefolder" href="javascript: cancelShare(jDbank.data.getGlobal('gUpLoadFileCatalogId'));" id="cancelShareCatalogId">取消共享</a> <a class="fmexistSharefolder" href="javascript: ajaxExistCatalogShare();" id="existShareCatalogId">退出共享</a>
				<span></span>
				<a class="fmmovefolder" href="javascript:openMoveCatalogTree();" id="fmmovefolder">移动到...</a> <a class="fmcopyfolder" href="javascript:openCopyCatalogTree();" id="fmcopyfolder">复制到...</a> <a class="fmrenamefolder" href="javascript:renameCatalog();" id="fmrenamefolder">重命名目录</a> <a class="fmdelfolder" href="javascript:deleteCatalog();" id="fmdelfolder">删除目录</a>
			</p>
		</div>
	</div>
	<script type="text/javascript">
		/* hide menu */
		function autoHideMenu(module) {
			var dMenus = [], i = 0;

			dMenus[0] = document.getElementById('dblistmenu');
			dMenus[1] = document.getElementById('dblinkmenu');
			dMenus[2] = document.getElementById('dbfoldermenu');
			dMenus[3] = document.getElementById('dbfilemenu');
			dMenus[4] = document.getElementById('dbfilemenu_inbox');
			dMenus[5] = document.getElementById('dblinkmanagemenu');

			var dTar;

			$(module).bind('click', function(e) {
				dTar = e.target;
				if ((e.keyCode == 2 && dTar.tagName.toLowerCase() == 'span')
            || (dTar.tagName.toLowerCase() == 'a' && jDbank(dTar).hasClass('disabled'))) {	//cancel hide rightmenu
					return;
				}

				for (i = 0; i < dMenus.length; i++) {
					if (dMenus[i] && dMenus[i].style.display == 'block') {
						dMenus[i].style.display = 'none';
					}
				}

				if ($('span.moremenu')[0] && document.getElementById('dblistmenu') && document.getElementById('dblistmenu').style.display != 'block'
            && (!document.getElementById('dbankmask') || (document.getElementById('dbankmask') && document.getElementById('dbankmask').style.display != 'block'))
            ) {
					$('span.moremenu').removeClass('over');
				}
			});

			var dInputs, i = 0;
			$(module).bind('keydown', function(event) {
				if (event.keyCode == 13 && document.getElementById('dbankalert') && document.getElementById('dbankalert').style.display == 'block') {
					document.getElementById('dbankalertbtns').getElementsByTagName('input')[0].focus();
					document.getElementById('dbankalertbtns').getElementsByTagName('input')[0].click();
				} else if (jDbank.ui._lastWin && event.keyCode == 13) {
					dInputs = jDbank.ui._lastWin.getElementsByTagName('input');

					for (i = 0; i < dInputs.length; i++) {
						if ($(dInputs[i]).hasClass('submitbtn')) {
							dInputs[i].focus();
							dInputs[i].click();
							return;
						}
					}
				}
			});
		}

		//right menu listener
		function menuListen(module, This) {
			var self = This;
			var dTar;
			var oModule = jDbank(module);
			var dLis = module.getElementsByTagName('li');
			jDbank(dLis).bind('mouseenter', function(e) {
				dTar = e.target;
				jDbank(dTar).addClass('on');
			});

			jDbank(dLis).bind('mouseleave', function(e) {
				dTar = e.target;
				jDbank(dTar).removeClass('on');
			});
		}
	</script>
	<script type="text/javascript">
		//--{{
		var currentShareCatalogId = "";
		var currentShareCatalogIsFirstSetting = false;
		/**
		* 如果是共享目录则弹出共享成员设置层，如非共享目录则把此目录设置为共享并弹出共享成员设置层
		× 第一次共享设置时如果点取消则把此目录再设置为非共享目录
		* @param catalogId		目录ID
		* @param shareState	共享状态  0:非共享目录 1：共享目录
		*/
		var relateCatalog;
		var saveShareMemberFlag = true;
		function saveShareMember(obj) {
			if (!saveShareMemberFlag) {
				return false;
			}
			saveShareMemberFlag = false;
			var j = myMailList.getSelectedNodes(false).datas;
			var emails = "";
			var privileges = "";
			for (var i = 0; i < j.length; i++) {
				if (emails != "") {
					emails += ",";
					privileges += ",";
				}
				emails += j[i].email;
				privileges += j[i].flag;
			}
			var url = "/ajax/saveShareMember.action";
			jDbankPost(url, { "catalogId": currentShareCatalogId, "emails": emails, "privileges": privileges }, function(response) {
				currentShareCatalogIsFirstSetting = false;

				if ($.trim(response) == "success") {
					// 变更样式
					changeCatalogShareFlag(relateCatalog, 1);
					jDbank.ui.showMsg('共享设置操作成功！');
					ajaxRefreshFileList();
					jDbank.ui.release();
					obj.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
				} else if ($.trim(response).indexOf("shareContNumExceed") >= 0) {
					var maxContNum = $.trim(response).split(":")[1];
					jDbank.ui.showMsg('共享设置操作失败,已超过最大共享目录数' + maxContNum + "个", true);
					jDbank.ui.release();
					obj.parentNode.parentNode.parentNode.parentNode.style.display = 'none';
				} else if ($.trim(response).indexOf("shareUserNumExceed") >= 0) {
					var maxLinkerNum = $.trim(response).split(":")[1];
					jDbank.ui.showMsg('共享设置操作失败,已超过最大共享联系人数' + maxLinkerNum + "个", true);
				} else {
					jDbank.ui.showMsg('共享设置操作失败', true);
				}
				saveShareMemberFlag = true;
			}
	    );
		}
		function share(catalogId, shareState) {
			//清空搜索项
			var searObj = $(".framesettingsearch input");
			if ($(searObj[1]).attr("class") == "clearbutton") {
				$(searObj[1]).removeClass("clearbutton");
				$(searObj[1]).addClass("contactbutton");
				$(searObj[0]).val("");
				$("#slink_0").empty();
				$("#linkManList4share").show();
				$("#slink_0").hide();
			}

			var tree = jDbank.data.getGlobal("tree");
			//var systemType = tree.data[catalogId].systemType;
			//if(systemType == 201 || systemType == 202){
			//	jDbank.ui.showMsg('此目录禁止共享！',true);
			//	return;
			//}
			var url = "/ajax/share.action";
			currentShareCatalogId = getShareRealId(catalogId);
			relateCatalog = catalogId;
			if (shareState == 0) {
				currentShareCatalogIsFirstSetting = true;
			}
			else {
				currentShareCatalogIsFirstSetting = false;
			}
			//alert(currentShareCatalogIsFirstSetting);

			jDbankPost(url, { "catalogId": currentShareCatalogId }, function(response) {
				response = $.trim(response);
				// 出错的情况
				if (response.indexOf("error:") == 0) {
					jDbank.ui.showMsg(response.substr(6), true);
					return;
				}

				var json = eval("(" + response + ")");
				var linkGruops = json[0].linkGruops;

				$.each(linkGruops, function(i, n) {
					n.html = '<h6><a href="javascript:void(0);" class="tickarr" title="选择该组">选择该组</a><a href="javascript:void(0);" class="closed" title="打开或关闭该组">' + n.name + '</a></h6>';
					n.html += '<ul id="slink_' + n.id + '">';
				}
	            );


				// 联系人		        
				$.each(json[0].linkMans, function(i, n) {
					generateLinkManHTML(linkGruops, n);
				}
		        );

				var html = "";
				$.each(linkGruops, function(i, n) {
					n.html += '</ul>';
					html += n.html;
				}
	            );
				$("#linkManList4share").html(html);
				html = "";
				// 共享成员
				var count = 0;
				$.each(json[0].shareMembers, function(i, n) {
					// 共享成员
					html += '<li id="slist_' + n.email + '" data="' + n.groupId + '" '
			            			+ (n.privilege > 0 ? 'class="up"' : '') + '>'
		                    		+ '<a href="javascript:void(0);" title="' + n.name + '(' + n.email + ')">'
		                    			+ '<span class="deleteit"></span>'
		                    			+ '<strong>' + n.name + '<em>(' + n.email + ')</em></strong>'
		                    		+ '</a>'
		                	  + '</li>';
					count++;
				}
		        );
				$("#shareManList").html(html);
				myMultiMailList.data = json[0].linkMans;
				myMultiMailList.set("defaultGroupId", "-1");
				var dCounter = document.getElementById('dbksharesetcounter');
				myMailList.set('selectedNum', count);
				dCounter.innerHTML = myMailList.get('selectedNum');
				window.currentFocusedDom = 'dbksharesetting';
				jDbank.ui.showSubWindow(document.getElementById('dbksharesetting'), false);
				jDbank.ui.disable();

			}
		);
		}
		function generateLinkManHTML(linkGruops, linkman) {
			var groups = linkman.groupId.split(",");
			$.each(linkGruops, function(i, n) {
				for (var i = 0; i < groups.length; i++) {
					if (groups[i] == n.id) {
						var html = '<li id="slink_' + groups[i] + '_' + linkman.email + '" data="' + linkman.groupId + '" '
											+ (linkman.selected == 1 ? 'class="selected"' : '') + '>'
										+ '<a href="javascript:void(0);" title="' + linkman.name + '(' + linkman.email + ')">'
											+ '<span></span><strong>' + linkman.name + '<em>(' + linkman.email + ')</em></strong>'
										+ '</a>'
								 + '</li>';
						n.html += html;
					}
				}
			}
        );
		}
		function cancelShareMemberSetting() {
			if (currentShareCatalogIsFirstSetting) {
				var url = "/ajax/cancelShare.action";
				jDbankPost(url, { "catalogId": currentShareCatalogId }, function(response) {
					if ($.trim(response) == "success") {
						//alert('test');
						//jDbank.ui.showMsg('取消共享操作成功！');
						// 变更样式
						//changeCatalogShareFlag(relateCatalog, 0);
					}
					else {
						//jDbank.ui.showMsg("取消共享操作失败，请稍后再试！", true);
					}
				}
	    	);
			}
		}
		function cancelShare(catalogId) {
			catalogId = $.trim(catalogId);
			if (catalogId == "") {
				return;
			}
			currentShareCatalogId = getShareRealId(catalogId);
			relateCatalog = catalogId;
			var url = "/ajax/cancelShare.action";
			jDbankPost(url, { "catalogId": currentShareCatalogId }, function(response) {
				if ($.trim(response) == "success") {
					jDbank.ui.showMsg('取消共享操作成功！');
					//window.location.reload();
					// 变更样式
					var dbtree = jDbank.data.getGlobal("dbtree");
					var rootId = dbtree.getRootId();
					changeCatalogShareFlag(rootId + "_" + getShareRealId(currentShareCatalogId), 0);
					var focusCatalogId = jDbank.data.getGlobal("gUpLoadFileCatalogId");
					//失去了焦点
					if (!document.getElementById("dbtree.idPre+focusCatalogId")) {
						refreshNetDisk();
					}
					else {
						ajaxRefreshFileList();
					}
				}
				else {
					jDbank.ui.showMsg("取消共享操作失败，请稍后再试！", true);
				}
			}
    	);
		}


		// myMultiMailList.data['slink_'+i] = {id: i, groupId: '0,1,2', name: '小王'+i, pinyin: 'xiaowang'+i, email: 'test@163.com', selected: (0)};
		var myMailList;
		var myMultiMailList;
		jDbank.module.sharedMailListInit = function(module) {
			var YUI = miniYUI, data, dLi;
			var dLastNode = null;
			var i = 0, arrId;
			var dCounter = document.getElementById('dbksharesetcounter');

			myMailList = new jDbank.ui.mailList(module.id);
			myMailList.idPre = 'slist';
			myMailList.set('maxNum', 1000);

			var fnSetFocusOne = function(This, node, ifRemove) {
				if (!YUI.hasClass(node, 'selected')) {
					This.setFocus(node);
				} else if (ifRemove) {
					This.removeFocus(node);
				}
			};

			myMailList.bind('click', function(eventObj) {
				if (!eventObj.shiftKey) {
					fnSetFocusOne(this, eventObj.clickNode, true);
					dLastNode = eventObj.clickNode;
				} else if (eventObj.shiftKey) {
					if (!dLastNode) { dLastNode = eventObj.clickNode; }
					if (eventObj.clickNode.offsetTop > dLastNode.offsetTop) {
						while (YUI.getNextSibling(dLastNode) && YUI.getNextSibling(dLastNode) != eventObj.clickNode) {  //shift select
							dLastNode = YUI.getNextSibling(dLastNode);
							fnSetFocusOne(this, dLastNode, false);
						}
					} else {
						while (YUI.getPreviousSibling(dLastNode) && YUI.getPreviousSibling(dLastNode) != eventObj.clickNode) {  //shift select
							dLastNode = YUI.getPreviousSibling(dLastNode);
							fnSetFocusOne(this, dLastNode, false);
						}
					}
					fnSetFocusOne(this, eventObj.clickNode, false);
					dLastNode = eventObj.clickNode;
				}
				//check flag status
				jDbank.module.checkFlagStatus(this);

				return true;
			});

			var fnRemoveFromRight = function(eventObj) {
				data = this.getNodeData(eventObj.clickNode);
				this.removeNode(eventObj.clickNode);
				this.set('selectedNum', this.get('selectedNum') - 1);
				dCounter.innerHTML = this.get('selectedNum');

				arrId = data.groupId.split(',');
				if (myMultiMailList) {
					myMultiMailList.changeGroupClass(data, false);
				}

				//check flag status
				jDbank.module.checkFlagStatus(this);


				return true;
			};
			myMailList.bind('dblclick', fnRemoveFromRight);
			myMailList.bind('icoClick', fnRemoveFromRight);

			myMailList.init();

			//record selected num
			myMailList.set('selectedNum', myMailList.getSelectedNodes().num);
			dCounter.innerHTML = myMailList.get('selectedNum');
		};

		jDbank.module.multiMailListInit = function(module) {


			var YUI = miniYUI, data, firstNode, dLi;
			var dLis, i = 0, j = 0, k = 0;
			var arrId, arrData = new Array();
			var dCounter = document.getElementById('dbksharesetcounter');

			myMultiMailList = new jDbank.ui.multiMailList(module.id);
			myMultiMailList.idPre = 'slink';
			myMultiMailList.set('icoClass', '');
			myMultiMailList.set('defaultGroupId', 1);
			myMultiMailList.set('maxNum', 1000);

			var fnAddOne = function(This, data, node, ifRemove) {
				if (myMailList) {
					firstNode = myMailList.firstNode();
					if (!ifRemove) {    //if add group
						if (firstNode) {
							myMailList.insertNode(data, firstNode, true);
						} else {
							myMailList.appendNode(data, true);
						}
						This.changeGroupClass(data, true);
						dCounter.innerHTML = myMailList.get('selectedNum');

					} else if (!YUI.hasClass(node, 'selected')) {   //if add to right
						if (firstNode) {
							myMailList.insertNode(data, firstNode, true);
						} else {
							myMailList.appendNode(data, true);
						}
						This.changeGroupClass(data, true);
						dCounter.innerHTML = myMailList.get('selectedNum');

					} else if (ifRemove) {    //if remove from right
						myMailList.removeNode(document.getElementById(myMailList.idPre + data.id));
						This.changeGroupClass(data, false);
						myMailList.set('selectedNum', myMailList.get('selectedNum') - 1);     //updata selected num
						dCounter.innerHTML = myMailList.get('selectedNum');
					}
					//check flag status
					jDbank.module.checkFlagStatus(myMailList);
				}
			};


			var fnAddInRight = function(eventObj) {
				data = this.getNodeData(eventObj.clickNode);
				fnAddOne(this, data, eventObj.clickNode, true);

				return true;
			};

			myMultiMailList.bind('click', fnAddInRight);
			myMultiMailList.bind('icoClick', fnAddInRight);

			var fnAddGroup = function(eventObj) {
				dLis = eventObj.addNodes;
				if (dLis.length == 0) { return; }
				for (i = 0; i < dLis.length; i++) {
					arrData[i] = this.getNodeData(dLis[i]);
				}
				fnAddOne(this, arrData, null, false);

				return true;
			};
			myMultiMailList.bind('groupClick', fnAddGroup);

			myMultiMailList.init();
			if (myMailList) { myMultiMailList.set('selectedNum', myMailList.get('selectedNum')); }
		};

		jDbank.module.checkFlagStatus = function(This) {    //check flag status
			var dUpBtn = document.getElementById('dbkssetup');
			var dCupBtn = document.getElementById('dbkssetcup');
			var oNodes = null;

			oNodes = This.getSelectedNodes();
			if (oNodes.allowUp) {
				dUpBtn.className = 'allowedupbutton';
			} else {
				dUpBtn.className = 'allowedupgraybutton';
			}

			if (oNodes.cancelUp) {
				dCupBtn.className = 'cancelupbutton';
			} else {
				dCupBtn.className = 'cancelupgraybutton';
			}
		};


		jDbank.module.setMailListUp = function(ifSet) { //set or cancel up class
			var YUI = miniYUI;
			var data;
			if (myMailList) {
				var dSelected = myMailList.getSelectedNodes();
				var nodes = dSelected.nodes;
				for (var i = 0; i < nodes.length; i++) {
					if (ifSet) {
						YUI.addClass(nodes[i], 'up');
					} else {
						YUI.removeClass(nodes[i], 'up');
					}
				}
				//check flag status
				jDbank.module.checkFlagStatus(myMailList);
			}
		};

		jDbank.module.resetAllList = function(module) { //reset all selected links
			var dTar, dLis;
			var YUI = miniYUI;
			var timer = null;

			var dDiv = document.getElementById('dbklinkselector').getElementsByTagName('div')[0];
			var dUl = document.getElementById('slink_0');
			var dSearchInput = YUI.getElementsByClassName('contacsearch', 'input', module)[0];
			var dSearchBtn = YUI.getNextSibling(dSearchInput);
			var dAddInput = YUI.getElementsByClassName('contactexts', 'input', module)[0];

			var dUpBtn = document.getElementById('dbkssetup');  //set or cancel up
			var dCupBtn = document.getElementById('dbkssetcup');


			var fnSearchIt = function() {
				if (dSearchInput.value == dSearchInput.defaultValue || $.trim(dSearchInput.value) == "")
					return;
				if (dDiv.style.display != 'none') {
					dDiv.style.display = 'none';
					dUl.style.display = 'block';
					dSearchBtn.className = 'clearbutton';
				}

				//search from data after a delay time
				if (myMultiMailList) {
					myMultiMailList.get('searchUl').innerHTML = 'loading..';
					if (timer) { clearTimeout(timer); }
					timer = setTimeout(function() {
						jDbank.module.searchLinkFromData.call(myMultiMailList, myMultiMailList.data, dSearchInput.value);
					}, 500);
				}
			};

			YUI.on(module, 'click', function(e) {
				dTar = YUI.getTarget(e);

				if (dTar.tagName.toLowerCase() == 'div' && myMailList) {
					dLis = myMailList.get('dUl').getElementsByTagName('li');
					myMailList.removeFocus(dLis);

					dUpBtn.className = 'allowedupgraybutton';
					dCupBtn.className = 'cancelupgraybutton';

				} else if (dTar.tagName.toLowerCase() == 'input' && dTar.className == 'addsbutton') {    //add link
					jDbank.module.addLinkFromInput(YUI.getPreviousSibling(dTar));
				} else if (dTar.tagName.toLowerCase() == 'input' && dTar.className == 'clearbutton') {
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
					dSearchInput.value = '';

				} else if (dTar.tagName.toLowerCase() == 'input' && dTar.className == 'contactbutton') {
					fnSearchIt();
				}
			});

			YUI.on(dAddInput, 'keydown', function(e) { //add link
				if (e.keyCode == 13) {
					jDbank.module.addLinkFromInput(dAddInput);
				}
			});

			YUI.on(dSearchInput, 'focus', function(e) {
				if (dSearchInput.value == '查找联系人') {
					dSearchInput.value = '';
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
				}
			});

			YUI.on(dSearchInput, 'keyup', function(e) { //search link
				if (dSearchInput.value == '') { //show back list
					dDiv.style.display = 'block';
					dUl.style.display = 'none';
					dSearchBtn.className = 'contactbutton';
				} else { //show search list
					fnSearchIt();
				}
			});
		};

		jDbank.module.addLinkFromInput = function(dInput) {
			var YUI = miniYUI;
			var dUl;
			var reMail = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
			var dCounter = document.getElementById('dbksharesetcounter');

			//input's value email format check here
			if (!reMail.test(dInput.value)) {
				jDbank.ui.showMsg('请输入正确的邮箱地址', true);
				dInput.focus();
				return;
			}

			//get node's id from ajax save data here and put the code in callback
			/*{{*/
			var url = "/ajax/createLinkMan4share.action";
			jDbankPost(url, { "emails": $.trim(dInput.value) }, function(response) {
				response = $.trim(response);
				if (response.indexOf("success") == 0) {
					response = response.substr(7);
				}
				else {
					jDbank.ui.showMsg('添加共享成员失败！', true);
					return;
				}

				var user = eval("(" + response + ")");
				var sId = user.email;
				var sName = user.nickname;
				var sGroupId = user.groupId;

				if (myMailList && myMultiMailList) {
					dUl = document.getElementById(myMultiMailList.idPre + '_' + myMultiMailList.get('defaultGroupId'));
					dUl.style.display = 'block';
					YUI.getPreviousSibling(dUl).getElementsByTagName('a')[1].className = 'opened';

					if (!document.getElementById(myMultiMailList.idPre + '_' + myMultiMailList.get('defaultGroupId') + '_' + sId)) {    //if not exist
						myMultiMailList.data[myMultiMailList.idPre + '_' + sId] = { //insert into data
							id: sId,
							groupId: sGroupId,
							name: sName,
							pinyin: sName,
							email: sId,
							selected: 1,
							flag: 0
						};

						dInput.value = '';
						dInput.focus();
					} else { //if allready exist
						myMultiMailList.data[myMultiMailList.idPre + '_' + sId].selected = 1;   //update status
					}

					// insert into data
					if (myMultiMailList.firstNode()) {   //add in left
						myMultiMailList.insertNode({ id: '_' + myMultiMailList.get('defaultGroupId') + '_' + sId,
							groupId: sGroupId,
							name: sName,
							email: sId,
							selected: 1
						},
	    	                myMultiMailList.firstNode(),
	    	                true);
					} else {
						myMultiMailList.appendNode({ id: '_' + myMultiMailList.get('defaultGroupId') + '_' + sId,
							groupId: sGroupId,
							name: sName,
							email: sId,
							selected: 1
						},
	    	                true);
					}

					if (myMailList.firstNode()) { //add in right
						myMailList.insertNode({ id: '_' + sId,
							groupId: sGroupId,
							name: sName,
							email: sId,
							selected: 0
						},
	    	                myMailList.firstNode(),
	    	                true);
					} else {
						myMailList.appendNode({ id: '_' + sId,
							groupId: sGroupId,
							name: sName,
							email: sId,
							selected: 0
						},
	    	                true);
					}
					//updata selected num
					dCounter.innerHTML = myMailList.get('selectedNum');

					//check flag status
					jDbank.module.checkFlagStatus(myMailList);

				}
			}
    	);
			/*}}*/
		};

		jDbank.module.searchLinkFromData = function(data, keyword) { //search link from and this is a multilinklist instance
			if (typeof (data) != 'object') { return 'we need an object data.'; }
			var YUI = miniYUI;
			var arr = new Array();
			var sId = '';
			for (key in data) {
				if (data[key].name.indexOf(keyword) > -1 || data[key].pinyin.indexOf(keyword) > -1 || data[key].email.indexOf(keyword) > -1) {
					sId = '_' + this.get('searchGroupId') + '_' + data[key].id;
					arr[arr.length] = YUI.clone(data[key]);
					arr[arr.length - 1].id = sId;
				}
			}

			if (arr.length > 0 && this.get('searchUl')) {
				this.get('searchUl').innerHTML = '';
				this.appendNode(arr, false, this.get('searchUl'));
			} else {
				this.get('searchUl').innerHTML = '<li>无相关记录.</li>';
			}
		};
		//--}}
		
 
	</script>
	<!--include listmenu module-->
	<!--include listmenu module-->
	<div id="dbgroupmenu" class="dbmenu dbwindiv groupmenu">
		<div>
			<p>
				<span></span>
				<a class="addgroup" href="javascript:void(0);">+添加分组</a>
			</p>
		</div>
	</div>
	<script type="text/javascript">
		function ajaxGetGroupMenu() {
			var linkManIds = getselectLinkManIds();
			if (linkManIds && linkManIds.length < 1) {
				jDbank.ui.showMsg('请至少选择一个联系人', true);
				return false;
			}
			var YUI = miniYUI, oPos;
			var dTar = document.getElementById("addgroupMenubutton");
			var dMenu = document.getElementById('dbgroupmenu');
			jDbank.ui.showSubWindow(dMenu, false);
			oPos = YUI.getPosition(dTar);
			dMenu.style.top = (oPos.top + 30) + 'px';
			dMenu.style.left = (oPos.left + 5) + 'px';
			jDbank.ui.disable();
			window.currentFocusedDom = 11;
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/getLinkManGroupsByNow.action?&a=" + Math.random();
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'json',
				timeout: 6000,
				async: false,
				cache: false,
				data: '',
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					if (data && data[0] && data[0]["LinkManGroups"]) {
						// add by zhangjianlin 
						jDbank.data.setGlobal("LinkManGroups", data[0]["LinkManGroups"]);
						var str = '';
						str += '<div>';
						str += '<p>';
						jQuery.each(data[0]["LinkManGroups"], function(i, n) {
							str += '<a href="javascript:void(0);"><input type="checkbox" value="' + n["linkmangroupid"] + '" name="groupMenuGroupIds"/>' + n["groupname"] + '</a>';
						});
						str += '<span></span>';
						str += '<a class="addgroup" href="javascript:void(0);">+添加分组</a>';
						str += '</p>';
						str += '</div>';
						document.getElementById("dbgroupmenu").innerHTML = str;
					}
				}
			});
		}

		function getGroupMenuIds() {
			var cb = document.getElementsByName("groupMenuGroupIds");
			var linkgroupids = new Array();
			for (var i = 0; i < cb.length; i++) {
				if (cb[i].checked == true) {
					linkgroupids.push(cb[i].value);
				}
			}
			return linkgroupids;
		}
		function changeLinkMansGroup() {
			var linkgroupids = getGroupMenuIds();
			if (!linkgroupids || linkgroupids.length < 1) {
				return;
			}
			var linkManIds = getselectLinkManIds();
			if (linkManIds && linkManIds.length < 1) {
				return false;
			}
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/changeLinkMansGroup.action";
			var params = jQuery.param(
			{
				'linkmanids': linkManIds,
				'linkgroupids': linkgroupids,
				'anticache': Math.floor(Math.random() * 1000)
			});
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'json',
				timeout: 6000,
				async: false,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					var flag = jDbank.data.getGlobal('flag');
					changeLinkManGroupResult();
					//jDbank.ui.showMsg('联系人所属组修改成功！');
				}
			});


		}
	</script>
	<!--include listmenu module-->
	<!--include listmenu module-->
	<div id="dbgroupselect">
		<h5>
			请选择所属组</h5>
		<form action="?">
		<div class="dbmenu groupmenu">
			<div>
				<p id="dbgroupselectp">
				</p>
			</div>
		</div>
		</form>
	</div>
	<script type="text/javascript">
		function ajaxGetGroupSelect() {
			var linkManIds = getselectLinkManIds();
			var linkManId;
			if (linkManIds && linkManIds.length > 0) {
				linkManId = linkManIds[0];
			} else {
				linkManId = "";
			}
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/getLinkManGroupsByNow.action?linkMan.linkManId=" + linkManId + "&a=" + Math.random();
			jQuery.ajax({
				url: url,
				type: 'GET',
				dataType: 'json',
				data: '',
				timeout: 6000,
				async: false,
				cache: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					if (data && data[0]) {
						var str = '';
						var temp = false;
						if (data[0]["groupIds"]) {
							if (data[0]["LinkManGroups"]) {
								// add by zhangjianlin 
								jDbank.data.setGlobal("LinkManGroups", data[0]["LinkManGroups"]);
								jQuery.each(data[0]["LinkManGroups"], function(i, n) {
									jQuery.each(data[0]["groupIds"], function(k, j) {
										if (n["linkmangroupid"] == j) {
											temp = true;
											return false;
										} else {
											temp = false;
										}
									});
									if (temp) {
										str += '<a href="javascript:void(0);"><input type="checkbox" value="' + n["linkmangroupid"] + '" name="groupSelectGroupId" checked="checked"/>' + n["groupname"] + '</a>';
									} else {
										str += '<a href="javascript:void(0);"><input type="checkbox" value="' + n["linkmangroupid"] + '" name="groupSelectGroupId"/>' + n["groupname"] + '</a>';
									}
								});
							}
						} else {
							if (data[0]["LinkManGroups"]) {
								// add by zhangjianlin 
								jDbank.data.setGlobal("LinkManGroups", data[0]["LinkManGroups"]);
								var str = '';
								jQuery.each(data["LinkManGroups"], function(i, n) {
									str += '<a href="javascript:void(0);"><input type="checkbox" value="' + n["linkmangroupid"] + '" name="groupSelectGroupId"/>' + n["groupname"] + '</a>';
								});

							}
						}
						document.getElementById("dbgroupselectp").innerHTML = str;
					}
				}
			});
		}
		function getGroupSelectIds() {
			var cb = document.getElementsByName("groupSelectGroupId");
			var linkgroupids = new Array();
			for (var i = 0; i < cb.length; i++) {
				if (cb[i].checked == true) {
					linkgroupids.push(cb[i].value);
				}
			}
			return linkgroupids;
		}

		function changeLinkManGroup() {
			jDbank.ui.sleep();
			//	var linkgroupids =getGroupSelectIds();
			var linkgroupids = jDbank.data.getGlobal("getGroupSelectIds");
			var linkManIds = getselectLinkManIds();
			var linkManId;
			if (linkManIds && linkManIds.length > 0) {
				linkManId = linkManIds[0];
			} else {
				linkManId = "";
			}
			var url = jDbank.data.getGlobal("systemContextPath()") + "/ajax/changeLinkManGroup.action";
			var params = jQuery.param(
			{
				'linkMan.linkManId': linkManId,
				'linkgroupids': linkgroupids,
				'anticache': Math.floor(Math.random() * 1000)
			});
			jQuery.ajax({
				url: url,
				type: 'POST',
				dataType: 'json',
				timeout: 6000,
				async: false,
				cache: false,
				data: params,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					errorType(XMLHttpRequest, textStatus, errorThrown);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					var flag = jDbank.data.getGlobal('flag');
					changeLinkManGroupResult();
					//jDbank.ui.showMsg('联系人所属组修改成功！');
				}
			});


		}
	</script>
	<!--include listmenu module-->
	<!--include listmenu module-->
	<div id="dblinkmenu" class="dbmenu dbwindiv">
		<div>
			<p>
				<a class="fmaddfolder" href="?">添加联系人</a> <a class="fmrenamefolder" href="?">重命名</a> <a class="fmdelfolder" href="?">删除组</a>
			</p>
		</div>
	</div>
	<!--include listmenu module-->
	<!--include listmenu module-->
	<div id="dbkaddlinkwin" class="framemoduleaddshow" style="margin: 0; z-index: 1000; display: none;">
		<div class="framemodule framemoduleadd">
			<div class="frameheader frameheadernor">
				<h1>
					添加联系人</h1>
				<a id="addlinkman_close" href="javascript:void(0);" class="close" onclick="javascript:closeAddLinkMan();"></a>
			</div>
			<div class="framecenteradd">
				<form id="addLinkManForm" action="#">
				<div class="framemainadd">
					<ul>
						<li>
							<span><em>*</em>联系人：</span><input id="linkmannamne" type="text" name="linkMan.nickname" class="inpuaddtext" onchange="javascript:validateName(this.value);" /></li>
						<li>
							<span><em>*</em>邮箱：</span><input id="linkmanemail" type="text" name="linkMan.email" class="inpuaddtext" onchange="javascript:validateEmail(this.value);" /></li>
						<li>
							<span>手机号码：</span><input id="linkmanmoble" type="text" name="linkMan.moble" class="inpuaddtext" onchange="javascript:validateMoble(this.value);" /></li>
						<li>
							<span>分组：</span><select id="addlinkman_select" class="inputselect" name="linkManGroup.linkmangroupid"></select>
						</li>
					</ul>
				</div>
				<div class="frameaddfoot mainbtn">
					<input type="button" class="btn cancelbutton" onclick="javascript:closeAddLinkMan();" />
					<input type="button" class="btn confirmbutton" onclick="javascript:addLinkMan();" />
				</div>
				</form>
			</div>
		</div>
		<script type="text/javascript">
			function validateEmail(email) {
				var complete = true;
				var regx = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
				if (!regx.test(email)) {
					jDbank.ui.showMsg("请输入正确的邮箱", true);
					complete = false;
				} else {
					$.ajax({
						url: jDbank.data.getGlobal("systemContextPath()") + "/ajax/checkEmailExist.action",
						cache: false,
						async: false,
						dataType: "json",
						type: "POST",
						data: "linkMan.email=" + email,
						success: function(data) {
							if (outSessionValue(data)) {
								return;
							}
							if (data.emailexist) {
								jDbank.ui.showMsg(email + "已经存在", true);
								complete = false;
							}
						}
					});
				}
				return complete;
			}
			function validateMoble(moble) {
				var complete = true;
				if (moble) {
					var regx = /^1[3,5,8]\d{9}$/;
					if (!regx.test(moble)) {
						jDbank.ui.showMsg("手机号码格式错误", true);
						complete = false;
					}
				}
				return complete;
			}

			function validateName(name) {
				if (name.length > 256) {
					jDbank.ui.showMsg("联系人名称不能超过256个长度", true);
					return false;
				}
				return true;
			}

			function checkAllInput(name, email, moble) {
				if (validateName(name)) {
					if (validateEmail(email)) {
						if (validateMoble(moble)) {
							return true;
						}
					}
				}
				return false;
			}

			function closeAddLinkMan() {
				jQuery("#addLinkManForm")[0].reset();
				jQuery("#dbkaddlinkwin").css("display", "none");
				jDbank.ui.release();
			}
 
		</script>
	</div>
	<!--include listmenu module-->
	<!--include listmenu module-->
	<!--include getLinks module-->
	<script type="text/javascript">
		function closePanel() {
			if (!miniYUI.hasClass(document.getElementById('dbklinkinfo'), 'none')) {
				jDbank.ui.hideSubWindow(document.getElementById('dbkgetlinks'));
				jDbank.ui.mask(false);
				return;
			}
			jQuery('#dbkgetlinks').hide();
			jDbank.ui.mask(false);
			jDbank.ui.release();

			var dtree = jDbank.data.getGlobal("tree");
			//获取链接点击确定后刷新file列表
			if (dtree && dtree == jDbank.data.getGlobal("sharetree")) {

				var rootnode = document.getElementById(dtree.idPre + getShareRootId(dtree.getFolderId()));
				ajaxRefreshFileList(rootnode.data.privilege, rootnode); //传递权限字段更新按钮状态
			} else {
				ajaxRefreshFileList();
			}

			return false;
		}
		function showPanel() {
			if (getSelectFileIds().length < 1) {
				jDbank.ui.showMsg("请至少选择一条记录进行操作！", true);
				return;
			}
			jDbank.ui.showSubWindow(document.getElementById('dbkgetlinks'), false);
			jDbank.ui.disable();
			loadFileLink();
		}

		function loadFileLink() {
			var params = { fileids: getSelectFileIds() };
			jQuery.ajax({
				url: "/ajax/getlinks.action?time=" + (new Date()).getTime(),
				type: 'get',
				dataType: 'json',
				timeout: 40000,
				data: params,
				error: function() {
					jDbank.ui.showMsg("获取链接失败！", true);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					if (data) {
						jQuery("#IM").val(data.link);
						jQuery("#SNS").val(data.htmlcode);
						jQuery("#BBS").val(data.bbscode);

						jQuery("#pcode").val(data.pcode);

						jQuery("#preview").attr("href", data.link);
					}
					else {
						jDbank.ui.showMsg("获取链接失败！", true);

					}
				},
				beforeSend: function(XMLHttpRequest) {
					jQuery("textarea[name=LINK]").each(function() {
						jQuery(this).val("");
					});

					beforesend();
				},
				complete: completefunc
			});
		}

		function deleteFileLink() {
			var params = { permissioncode: jQuery("#pcode").val() };
			jQuery.ajax({
				url: "/ajax/dellinks.action?time=" + (new Date()).getTime(),
				type: 'get',
				dataType: 'json',
				timeout: 10000,
				data: params,
				error: function() {
					jDbank.ui.showMsg("删除链接失败！", true);
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					if (data) {
						jQuery("textarea[name=LINK]").each(function() {
							jQuery(this).val("");
						});

						closePanel();

						jDbank.ui.showMsg("删除链接成功！", false);

					}
					else {
						jDbank.ui.showMsg("删除链接失败！", true);

					}
				},
				beforeSend: beforesend,
				complete: completefunc
			});
		}

		var beforesend = function(XMLHttpRequest) {
			jQuery("#subbutton").attr({ "disabled": true });
			jQuery("#delbutton").attr({ "disabled": true });

			jQuery("img[name=loading]").each(function() {
				jQuery(this).show();
			});
		}

		var completefunc = function(XMLHttpRequest) {
			jQuery("#subbutton").attr({ "disabled": false });
			jQuery("#delbutton").attr({ "disabled": false });

			jQuery("img[name=loading]").each(function() {
				jQuery(this).hide();
			});
		}
		/*
		jQuery(document).ready(function(){
		jQuery("textarea[name=LINK]").each(function(){
		jQuery(this).bind("click",function(){
		this.select();//单击选中文本
		});
		});
		});
		*/
		function link_closeLinkWin() {
			var dWin = document.getElementById('dbkgetlinks');
			dWin.style.display = 'none';
			jDbank.ui.mask(false);
			jDbank.ui.release();
			if (typeof (dWin.addNew) != 'undefined' && dWin.addNew && typeof (dWin.newLinkId) != 'undefined' && dWin.newLinkId !== '') {
				jDbank.module.delFileLinks(dWin.newLinkId);
			}
		}
 
	</script>
	<div id="dbkgetlinks" class="framemodulelinkshow" serviceurl="/ajax/getExternalLink.action" saveurl="/ajax/saveExternalLink.action" updateurl="/ajax/updateExternalLink.action" changestatusurl="/ajax/updateExternalLinkStatus.action" deleteurl="/ajax/deleteExternalLink.action" selectorurl="/view/netdisk/resourceSelector.jsp" style="position: absolute; margin: 0; display: none; z-index: 1000;">
		<div class="framemodule framemodulelink">
			<div class="frameheader frameheadernor">
				<h1>
					获取链接</h1>
				<a href="javascript:void(0);" onclick="link_closeLinkWin();" class="close"></a>
			</div>
			<div class="framecenter framecenterlink">
				<input type="button" class="addbutton" title="添加文件" />
				<div id="dbkrlistgetlink" class="framemainlink filelist">
					<table class="filelist">
						<tbody>
							<tr>
								<td>
									loading...
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<input id="pcode" value="" type="hidden" />
				<div class="framemainlink">
					<table>
						<colgroup>
							<col width="116">
							<col>
						</colgroup>
						<tbody>
							<tr>
								<th>
									外链名称：
								</th>
								<td>
									<input type="text" value="" class="linkname" maxlength="256" />
								</td>
							</tr>
							<tr>
								<th>
									下载次数限制：
								</th>
								<td>
									<input type="text" value="" class="downcount" maxlength="7" />次/日<span id="exceedTip" style="color: red; display: none;"></span>
								</td>
							</tr>
							<tr>
								<th>
									外链地址：
								</th>
								<td>
									<input type="button" value="" class="updatebutton" onclick="javascript:jDbank.module.saveLink(true);" />
									<span class="smalltip" style="display: none">更新成功，已生成新的外链地址，原外链地址失效!</span>
								</td>
							</tr>
						</tbody>
					</table>
					<ul class="urls">
						<li>
							<div class="linktitle">
								<span>直接访问地址：<em>例如通过QQ、MSN、EMAIL等形式发给好友</em><img src="http://st2.dbank.com/images/loading.gif" name="loading" style="display: none;" /></span>
								<a href="javascript:void(0);" id="preview" target="_blank">预览</a>
							</div>
							<input id="IM" name="LINK" class="linkcode" type="text" value="" />
							<input type="button" class="copysbutton" onclick="jDbank.module.copyToClipboard(document.getElementById('IM'))" />
						</li>
						<li>
							<div class="linktitle">
								<span>网页代码：<em>例如加入链接到MySpace、博客等网站中</em><img src="http://st2.dbank.com/images/loading.gif" name="loading" style="display: none;" /></span>
							</div>
							<input id="SNS" name="LINK" class="linkcode" type="text" value="" />
							<input type="button" class="copysbutton" onclick="jDbank.module.copyToClipboard(document.getElementById('SNS'))" />
						</li>
						<li>
							<div class="linktitle">
								<span>论坛代码：<em>例如加入链接到PHPWind、Discuz!等论坛中</em><img src="http://st2.dbank.com/images/loading.gif" name="loading" style="display: none;" /></span>
							</div>
							<input id="BBS" name="LINK" class="linkcode" type="text" value="" />
							<input type="button" class="copysbutton" onclick="jDbank.module.copyToClipboard(document.getElementById('BBS'))" />
						</li>
					</ul>
				</div>
				<div class="framefoot mainbtn">
					<!--input type="button" class="delinkbutton" value="" onclick="jDbank.module.delFileLinks('/ajax/deletelink.action')"  id="delbutton"/-->
					<input type="button" class="btn cancelbutton" value="" onclick="javascript:link_closeLinkWin();" />
					<input type="button" class="btn confirmbutton" value="" onclick="javascript:return jDbank.module.saveLink();return closePanel();" id="subbutton" />
				</div>
			</div>
		</div>
	</div>
	<!--include getLinks module-->
	<!--include listmenu module-->
	<!--include treeAssist module-->
	<!--tree assist-->
	<div id="dbtreefollowdrag">
		<h6>
		</h6>
		<p>
		</p>
		<ul>
		</ul>
	</div>
	<div id="dbtreealter">
		<input id="dbtreealterinput" name="foldername" type="text" value="" maxlength="256" />
	</div>
	<!--include treeAssist module-->
	<!--include jslogin module-->
	<script type="text/javascript">
		jQuery(document).ready(function() {
			jQuery("#email").val(jQuery("#ajaxloginemail").html());
		});
		function ajaxlogin() {
			if (!jQuery.formValidator.PageIsValid('1')) return false;
			//如果用户不是以原来的email登录，则返回true采用非ajax方式登录
			if (jQuery("#email").val() != jQuery("#ajaxloginemail").html() &&
        	location.href.indexOf('download.action') < 0) return true; //下载页面除外
			var params = { 'userModel.email': jQuery("#email").val(), 'userModel.password': jQuery("#password").val(), 'userModel.rememberme': jQuery("#remember").val() };
			if (!jQuery("#remember").attr("checked")) {
				params = { 'userModel.email': jQuery("#email").val(), 'userModel.password': jQuery("#password").val() };
			}
			jQuery.ajax({
				url: "/ajax_user/timeoutLogin.action?time=" + (new Date()).getTime(),
				type: 'post',
				data: params,
				dataType: 'json',
				timeout: 10000,
				error: function() {
					jDbank.ui.showMsg("登录失败！", true);
				},
				success: function(data) {
					if (!data) jDbank.ui.showMsg("登录失败！", true);
					if (data.isSuccess) {
						//登录的是之前的帐号
						jDbank.ui.showMsg(data.message);
						jQuery("#ajaxlogin").hide();
						if (jDbank.data.getGlobal("ajaxloginfrom") == "fromdownload") {
							changeHeader(data.username, data.skin);
							$("#download_list_href").show();
							$("#download_list_click").hide();
						}
						jDbank.ui.release();
					} else {
						jDbank.ui.showMsg(data.message, true);
					}
				},
				beforeSend: function(XMLHttpRequest) {
					jDbank.ui.showMsg("正在登录中...");
					jQuery("#submit").attr("disabled", true);
				},
				complete: function(XMLHttpRequest, textStatus) {
					jQuery("#submit").attr("disabled", false);
				}
			});

			return false;
		}
	</script>
	<div id="ajaxlogin" class="framemoduleshow" style="margin: 0; display: none; z-index: 10000;">
		<div id="ajaxloginemail" style="display: none;">
		</div>
		<div class="framemodule framelogin" style="position: static; margin: 0;">
			<!--[if lte IE 6.5]><iframe style="position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;filter:mask();"></iframe><![endif]-->
			<div class="frameheader frameloginheader">
				<h1>
					登录</h1>
				<span id="jslogin_closeimg"><a href="#" class="closes close" onclick="jQuery('#ajaxlogin').hide();jDbank.ui.release();"></a></span>
			</div>
			<div class="framecenter framelogincenter clearfix">
				<p id="jslogin_comment">
					登录超时，请您重新登录</p>
				<form id="userform" name="userForm" action="/user/login.action" method="post">
				<table>
					<tr>
						<th>
						</th>
						<td class="tips">
							<em class="" id="emailTip"></em><em class="" id="passwordTip"></em>
						</td>
					</tr>
					<tr>
						<th>
							邮&nbsp;&nbsp;箱：
						</th>
						<td>
							<input type="text" class="inputext" id="email" name="userModel.email" maxlength="256" autocomplete="off" />
						</td>
					</tr>
					<tr>
						<th>
							密&nbsp;&nbsp;码：
						</th>
						<td>
							<input type="password" class="inputext" id="password" name="userModel.password" maxlength="32" autocomplete="off" />
						</td>
					</tr>
					<tr>
						<th>
						</th>
						<td class="loginclause">
							<input type="checkbox" name="userModel.rememberme" id="remember" />
							<em>记住我</em><a href="#" onclick="javascript:window.location.href='/user/forgetPassword.action?u.email='+jQuery('#ajaxloginemail').text();" class="paw">忘记密码了？</a>
						</td>
					</tr>
					<tr>
						<th>
						</th>
						<td>
							<input type="submit" class="btn enterbutton" value="" id="submit" onclick="return ajaxlogin();" /><div class="userlogin" onclick="window.open('/user/register.jsp',target='_top');">
							</div>
						</td>
					</tr>
				</table>
				</form>
			</div>
			<div class="frameloginfoot">
			</div>
		</div>
	</div>
	<!--include jslogin module-->
	<!--include auto user modify user info module-->
	<div id="dbkaltuser" class="framemoduleshow" style="z-index: 10000; display: none">
		<div class="framemodule">
			<div class="frameheader">
				<h1 id="moveTypeId">
					修改个人信息</h1>
				<a href="javascript:closeLoginModifyPWDiv();" class="close"></a>
			</div>
			<div class="framecenter">
				<p>
					欢迎您使用数据银行，您目前的密码是 <strong id="login_modify_password_tip"></strong>
					<br />
					为了方便您以后使用，请您更新个人资料并修改密码
				</p>
				<table>
					<colgroup>
						<col width="74">
						<col>
					</colgroup>
					<tr>
						<th>
							&nbsp;
						</th>
						<td class="errortip" id="dbkaltuser_tip">
						</td>
					</tr>
					<tr>
						<th>
							帐号：
						</th>
						<td>
							<span id="login_modify_email_text"></span>
							<input type="hidden" id="login_modify_email" name="login_modify_email" />
						</td>
					</tr>
					<tr>
						<th>
							昵称：
						</th>
						<td>
							<input class="txt gray" type="text" id="login_modify_name" name="login_modify_name" />
						</td>
					</tr>
					<tr>
						<th>
							新密码：
						</th>
						<td>
							<input class="txt" type="password" id="login_modify_pw1" name="login_modify_pw1" />
						</td>
					</tr>
					<tr>
						<th>
							确认密码：
						</th>
						<td>
							<input class="txt" type="password" id="login_modify_pw2" name="login_modify_pw2" />
						</td>
					</tr>
					<tr>
						<th>
							&nbsp;
						</th>
						<td class="mainbtn">
							<input class="btn save" type="button" value="" onclick="submitLoginModifyPWInfo()" />
							<input class="btn skip" type="button" value="" onclick="closeLoginModifyPWDiv();" />
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function openLoginModifyPWDiv() {
			jDbank.ui.disable();
			jQuery("#dbkaltuser").show();
		}

		function closeLoginModifyPWDiv() {
			clearWindowFlag();
			jQuery("#dbkaltuser").hide();
			jDbank.ui.release();
		}

		function showModifyMessage(message) {
			jQuery("#dbkaltuser_tip").html(message);
		}
		/**
		* 清除用户窗口标志
		*/
		function clearWindowFlag() {
			var url = "/ajax_user/clearWindowFlag.action";
			$.ajax({
				type: "POST",
				url: url,
				data: ''
			});
		}
		/**
		* 1.修改top页面用户昵称
		* 2.修改个人信息页面用户昵称
		*/
		function updateHtmlUserName() {
			jQuery("#dbknickname").html(jQuery("#login_modify_name").val());
			jQuery("#confignickname").val(jQuery("#login_modify_name").val());
		}

		function submitLoginModifyPWInfo() {
			var pw1Length = jQuery("#login_modify_pw1").val().length;
			if (pw1Length < 6) {
				showModifyMessage("密码最少不得低于六位");
				return;
			}

			if (jQuery("#login_modify_pw1").val() != jQuery("#login_modify_pw2").val()) {
				showModifyMessage("两次密码输入不一致");
				return;
			}

			var url = "/ajax_user/updateUserInfo4AutoUser.action?timestamp=" + parseInt(Math.random() * 1000);
			var params = jQuery.param(
		    {
		    	'userModel.email': jQuery("#login_modify_email").val(),
		    	'userModel.username': jQuery("#login_modify_name").val(),
		    	'userModel.newPassword1': jQuery("#login_modify_pw1").val(),
		    	'userModel.newPassword2': jQuery("#login_modify_pw2").val()
		    });
			jQuery.ajax({
				url: url,
				type: 'post',
				data: params,
				dataType: 'json',
				timeout: 10000,
				error: function() {
					showModifyMessage("修改密码失败！");
				},
				success: function(data) {
					if (outSessionValue(data)) {
						return;
					}
					if (!data.isSuccess) {
						showModifyMessage(data.message);
					} else {
						showModifyMessage("修改成功！");
						jDbank.ui.showMsg("修改成功！请牢记您的新密码：" + jQuery("#login_modify_pw1").val(), false, 6);
						updateHtmlUserName();
						jQuery("#login_modify_password_tip").html(jQuery("#login_modify_pw1").val());
						closeLoginModifyPWDiv();
					}
				},
				beforeSend: function(XMLHttpRequest) {
					jDbank.ui.showMsg("已提交请求...", false, 1);
					jQuery("#login_modify_pw_savebutton").attr("disabled", true);
				},
				complete: function(XMLHttpRequest, textStatus) {
					jQuery("#login_modify_pw_savebutton").attr("disabled", false);
				}
			});
		}
	</script>
	<!--include auto user modify user info module-->
	<script type="text/javascript">
		//一些需要初始化的参数
		var upload_server_url;
		var register_file_maxsize;
		var flash_session_time_out;

		//磁盘是否超容标识
		var isUserDiskOverflow = false;

		//设置全局变量
		var initGlobalValue = function(userModel) {
			jDbank.data.setGlobal("sessionuserid", userModel.userid);
			jDbank.data.setGlobal("netDiskTitle", userModel.netDiskTitle);
			jDbank.data.setGlobal('sessionIp', userModel.sessionIp);

			upload_server_url = userModel.uploadServerURL;
			register_file_maxsize = userModel.fileUploadSize;
			flash_session_time_out = userModel.flashSessionTimeOut;
		};

		//初始化页面用户个人信息
		var initPageUserInfo = function(userModel) {
			//user_header page
			jQuery("#dbknickname").text(userModel.username);
			jQuery("#curUserProduct").text(userModel.productName);
			jQuery("#curUserPoints").text(userModel.userPoint + "分");

			//个人信息设置页面
			jQuery("#useremail").text(userModel.email);
			jQuery("#confignickname").attr("value", userModel.username);
			jQuery("#sex_" + userModel.sex).attr("checked", "checked");
			jQuery("#settingPageUserName").text(userModel.username);
			jQuery("#settingPageCssType_" + userModel.defaultCss).attr("class", "on");
			doWhileExist('dbkstyleselector', switchSkin);

			//邀请页面
			jQuery("#inviterurl").attr("value", userModel.inviterLink);
			//发送文件
			jQuery("#deliverFrom").val(userModel.username);
			//jQuery("#dbkemailcontainer").attr("maxnum",userModel.maxReceiverNum);
			emailAutoComplete.setMaxNum(userModel.maxReceiverNum);
			jQuery("#deliveryfilesize").attr("deliveryproductid", userModel.productId);
			jQuery("#attachment_allow_size").val(userModel.deliveryFileTotalSize);

			//pop-up
			jQuery("#popmoder").val(userModel.popmoder);
			//超时登陆框
			jQuery("#ajaxloginemail").text(userModel.email);
			jQuery("#email").val(userModel.email);
			//自动注册用户首次登陆，弹出的信息修改框
			if (userModel.autoUserFirstLogin) {
				jQuery("#login_modify_password_tip").text(userModel.password);
			}
			jQuery("#login_modify_email").val(userModel.email);
			jQuery("#login_modify_email_text").text(userModel.email);
			jQuery("#login_modify_name").val(userModel.username);
		};


		//切换网盘界面
		var switchNetDiskUI = function(userModel) {
			switchLeft(userModel.initFlag, userModel.initType, userModel.other);
			if (userModel.initFlag != '') {
				if (userModel.initFlag == 2) {
					imitateFileDeliverClick(userModel.initType, userModel.other);
				} else if (userModel.initFlag == 4) {
					imitateLinkManClick(userModel.initType, userModel.other);
				} else if (userModel.initFlag == 1) {
					imitateNetDiskClick(userModel.initType, userModel.other);
				} else {
					imitateNetDiskClick(userModel.initType, userModel.other);
				}
			} else {
				imitateNetDiskClick(userModel.initType, userModel.other);
			}
			//设置页面脚本初始化
			initSettingUserValidateJs();
			//自动注册用户第一次登陆
			if (userModel.autoUserFirstLogin) {
				openLoginModifyPWDiv();
			}
		};

		/**
		* 页面加载完后，需要执行的操作
		* (为了不影响页面性能，采用延迟的方法)
		*/
		var loadFinished = function() {
			setTimeout(function() {
				//1.清除初始化窗口标识（为了保证至少一次的成功加载，故采用ajax方式）
				clearSystemInitFlag();
				//2.初始化文件快递消息
				initUnreadMessage();
				//3.初始化pop,清理用户的流量数据
				clearUserThroughput();
				//initPop();
				//4.加载上传插件
				miniYUI.doWhileExist('pluginContainer', jDbank.module.loadIEPlugin);
				//5.加载客户端插件
				if (dbankClientDownloader) {
					dbankClientDownloader.loadPlugin();
				}
				initInvite(initUserNetDiskObject.userModel.emailComments,
		        initUserNetDiskObject.userModel.inviteSentTotalRecord);
			}, 3000);
		};

		//网盘初始化入口
		jDbank(document).ready(function() {
			//初始化网盘界面
			initUserNetDiskObject.updateUserNetDisk(function() {
				var userModel = initUserNetDiskObject.userModel;
				//1.设置全局变量
				initGlobalValue(userModel);
				//2.初始化用户个人信息
				initPageUserInfo(userModel);
				//3.切换界面
				switchNetDiskUI(userModel);
				//4.页面初始化完成
				loadFinished();
			});
		});

		function imitateClick(initFlag, initType, other) {
			if (initFlag == 2) {
				imitateFileDeliverClick(initType, other);
			} else if (initFlag == 4) {
				imitateLinkManClick(initType, other);
			} else {
				imitateNetDiskClick(initType, other);
			}
		}

		function imitateFileDeliverClick(initType, other) {
			jDbank.data.setGlobal("userFileSystemTyped", 2);
			switchLeft(2, initType, other);
			jQuery("#stationOnclickID").click();
		}
		function imitateNetDiskClick(initType, other) {
			switchLeft('1', initType, other);
			jQuery("#netDiskOnclickID").click();
		}

		function imitateLinkManClick(initType, other) {
			switchLeft(4, initType, other);
			jQuery("#linkManOnclickID").click();
		}

		jDbank(document).ready(function() {
			//网盘、注册中转站切换
			//doWhileExist('dbkswitcher', switchLeft);
			doWhileExist(document, autoHideMenu);
			doWhileExist('dblistmenu', menuListen, jDbank.data.getGlobal("dbtree"));
			doWhileExist('dbksendfile', emailAutoComplete, []);

			//解决ie左右拉条bug
			treeHeightFit();
			doWhileExist('dbklinklist', myLinksInit);
			//弹窗拖拽
			//if(judgeBrowser() == SWFUpload.WINDOW_MODE.OPAQUE){
			jDbank('#dbkuploadfile').draggable({ handle: 'div.frameheader', scroll: false });
			//}
			jDbank('#dbkmovefile').draggable({ handle: 'div.frameheader', scroll: false });
			jDbank('#dbkaddlinkwin').draggable({ handle: 'div.frameheader', scroll: false });
			jDbank('#dbkgetlinks').draggable({ handle: 'div.frameheader', scroll: false });
			jDbank('#dbksharesetting').draggable({ handle: 'div.frameheader', scroll: false });

			//undo 操作撤销绑定
			miniYUI.on(document, 'click', function(e) {
				jDbank.module.hideUndoMessage(e);
				//文件快递选择图层隐藏
				hideFilemsgswitc(e);
			});

			//右键
			jDbank.module.rightmenuDisable();
		});


		$(document).ready(function() {

			miniYUI.doWhileExist('dbkmaillist', jDbank.module.sharedMailListInit);
			miniYUI.doWhileExist('dbklinkselector', jDbank.module.multiMailListInit);
			miniYUI.doWhileExist('dbksharesetting', jDbank.module.resetAllList);
			miniYUI.doWhileExist('dbkdrager', jDbank.module.dragerInit);
			//add by zhangjianlin 处理邮箱密码记住的情况
			jQuery("#emailaccount_portmain").val("");
			jQuery("#emailaccount_password").val("");
			taskmanager = new TaskManager();
		}
);

		jDbank.module.initFlashUploader = function() {
			var dFlashContainer = document.getElementById('swfuploadContainer'),
		dFlashContainer_attach = document.getElementById('swfuploadcontainer_attach'),
		dPlugin = document.getElementById('dbkUlopadPlugin'),
		dPlugin_attach = document.getElementById('dbkUploadPlugin_attach');
			if (!jDbank.module.detecPlugin()) {	//if upload plugin is not installed then use swfUpload
				if (dPlugin_attach) { dPlugin_attach.style.display = 'none'; }
				if (!disk) {
					disk = new SWFUpload({
						flash_url: "http://st3.dbank.com/js/swf/swfupload.swf",
						upload_url: upload_server_url,
						button_image_url: "http://st2.dbank.com/images/disk_add_file.png",
						button_width: "86",
						button_height: "23",
						button_placeholder_id: "add_diskfile",
						button_action: SWFUpload.BUTTON_ACTION.SELECT_FILES,
						button_window_mode: judgeBrowser(),

						file_post_name: "Filedata",
						moving_average_history_size: 40,
						requeue_on_error: false,
						assume_success_timeout: 20,

						swfupload_loaded_handler: flashReady,
						file_queued_handler: fileQueued,
						file_dialog_complete_handler: fileDialogComplete,
						upload_start_handler: uploadStart,
						upload_progress_handler: uploadProgress,
						upload_success_handler: uploadSuccess,
						upload_complete_handler: uploadComplete,
						file_queue_error_handler: file_queue_error,
						upload_error_handler: file_upload_error,

						button_cursor: SWFUpload.CURSOR.HAND,

						custom_settings: {
							register_file_maxsize: register_file_maxsize,
							contexpath: "",
							flash_session_time_out: flash_session_time_out
						}
					});

					send = new SWFUpload({
						flash_url: "http://st3.dbank.com/js/swf/swfupload.swf",
						upload_url: upload_server_url,
						button_image_url: "http://st2.dbank.com/images/send_add_attachment.png",
						button_width: "75",
						button_height: "20",
						button_placeholder_id: "add_attachment",
						button_action: SWFUpload.BUTTON_ACTION.SELECT_FILES,
						button_window_mode: SWFUpload.WINDOW_MODE.OPAQUE,

						file_post_name: "Filedata",
						moving_average_history_size: 40,
						requeue_on_error: false,
						assume_success_timeout: 20,

						file_queued_handler: fileQueued,
						file_dialog_complete_handler: fileDialogComplete,
						upload_start_handler: uploadStart,
						upload_progress_handler: uploadProgress,
						upload_success_handler: uploadSuccess,
						upload_complete_handler: uploadComplete,
						file_queue_error_handler: file_queue_error,
						upload_error_handler: file_upload_error,

						button_cursor: SWFUpload.CURSOR.HAND
					});
					if (dPlugin) { dPlugin.style.display = 'none'; }
				}
			} else {
				if (dFlashContainer) { dFlashContainer.style.display = 'none'; }
				if (dFlashContainer_attach) { dFlashContainer_attach.style.display = 'none'; }
				if (dPlugin) { dPlugin.style.display = ''; }
				if (dPlugin_attach) { dPlugin_attach.style.display = ''; }
			}
		};
	</script>
	<div id="vido_complete">
	</div>
	<iframe name="download_file_iframe" id="download_file_iframe" style="display: none;"></iframe>
	<form id="download_file_form" method="post" target="download_file_iframe" style="display: none;">
	</form>
	<div id="pluginContainer" sversion="1,0,0,182" classid="7A9879A7-CA86-49D9-83FE-F368E004CB45" pluginurl="http://st2.dbank.com/plugin/DBank_Netdisk_Uploader.CAB" sparams="{URL_ADDR:'upload1.dbank.com'}">
	</div>
	<script type="text/javascript" src="http://st3.dbank.com/js/init-newfilelist.js"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/clientDownloader-plugin.js"></script>
	<!--script type="text/javascript" src="http://st3.dbank.com/js/jDbank_loger.js"></script-->
	<script type="text/javascript" src="http://st3.dbank.com/js/iePlugin.js"></script>
	<script type="text/javascript" src="http://st3.dbank.com/js/popMsg.js"></script>
	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
		try {
			var pageTracker = _gat._getTracker("UA-8272227-1");
			pageTracker._initData();
			pageTracker._trackPageview();
		} catch (err) { }
	</script>
	<div id="ajaxurl" style="display: none">
		/emailValIsExists.do</div>
	<div class="contentfoot" style="_bottom: -1px;">
		<div class="contentfootleft">
		</div>
		<div class="contentfootright">
		</div>
	</div>
	<div id="dbkpicasacon">
		<!--xmlUrl传进flash的参数，为图片信息的xml地址，采用escape编码
	StageWidth传进flash的参数，为浏览器宽度
	StageHeight传进flash的参数，为浏览器高度-->
		<object id="dbkflashpicasa" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="1" height="1" align="middle">
			<param name="allowScriptAccess" value="always" />
			<param name="allowFullScreen" value="true" />
			<param name="movie" value="http://www.dbank.com/js/picasa.swf?version=v1.21&xmlUrl=" />
			<param name="quality" value="high" />
			<param name="wmode" value="Transparent" />
			<param name="bgcolor" value="#000000" />
			<embed name="dbkflashpicasa" src="http://www.dbank.com/js/picasa.swf?version=v1.21&xmlUrl=" width="1" height="1" align="middle" play="true" loop="false" quality="high" wmode="transparent" bgcolor="#000000" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"> 
		</embed>
		</object>
	</div>
	<script type="text/javascript">
		window.onresize = setFlashStatus;
		var flashinit = false;
		function setFlashStatus() {
			if (!flashinit) return;
			var flashObj = getFlashObj('dbkflashpicasa');   //check flash object

			var iW = $(window).width();
			var iH = $(window).height();

			var dFlash = document.getElementById('dbkflashpicasa');
			if (!dFlash) { return; }
			var dFlashembed = dFlash.getElementsByTagName('embed')[0];

			//var iW = 800;
			//var iH = 500;
			//dFlashCon.style.top = '0px';

			dFlash.style.width = iW + 'px';
			dFlash.style.height = iH + 'px';

			if (dFlashembed) {
				dFlashembed.style.width = iW + 'px';
				dFlashembed.style.height = iH + 'px';

			}

			try {
				flashObj.callAsSize(iH, iW);
			} catch (e) {
				jDbank.ui.showMsg('看图软件加载失败，请刷新页面后重试^_^');
				//出错时，直接执行close方法，关闭掉层
				jsclose();
			}
			/*
			for(;;) {
			if(!Object.prototype.toString.apply(getFlashObj('dbkflashpicasa').callAsSize) ==="[object Function]"){
			continue;
			}else {
			getFlashObj('dbkflashpicasa').callAsSize(iH, iW);
			break;
			}
			}
			*/
		}

		function openInFlashPicasa(picId, catalogid) { //open a picture in flash picasa
			var sUid = jDbank.data.getGlobal("tree").data[getUpLoadFileCatalogId()].sUid;
			var url = "/user/photoview.action?photosize=40,40&bigphotosize=" + screen.width + "," + screen.height + "&sUid=" + sUid + "&folderid=";
			var flashObj = getFlashObj('dbkflashpicasa');   //check flash object

			flashinit = true;
			setFlashStatus();
			document.getElementById('dbkpicasacon').style.top = '0px';
			if (!photoisopened) {
				try {
					flashObj.callAsXmlUrl(url + catalogid + "&time=" + (new Date()).getTime());
				} catch (ex) {
					//alert(">>>>ex:" +ex);
					jDbank.ui.showMsg('看图软件加载失败，请刷新页面后重试^_^');
					//出错时，直接执行close方法，关闭掉层
					jsclose();
					return;
				}
				photoisopened = true;
			}
			try {
				flashObj.callAsOpen(picId);
			} catch (e) {
				jDbank.ui.showMsg('看图软件加载失败，请刷新页面后重试^_^');
				//出错时，直接执行close方法，关闭掉层
				jsclose();
			}
		};
	</script>
</body>
</html>
